def _get_taxy_tool(self, taxonomy): """ helper to get the TaxyTool version of the given argument. @param taxonomy Either a TaxyTool, a Taxonomy, or some value that can be processed by TaxyTool.load to create the TaxyTool instance. """ if isinstance(taxonomy, TaxyTool): tx = taxonomy elif isinstance(taxonomy, Taxonomy): tx = TaxyTool(taxonomy) else: tx = TaxyTool.load(taxonomy) return tx