"""Node that tests custom category assignment through extraction of the current category"""
import omni.graph.tools.ogn as ogn


class OgnTestCategoryDefinitions:
    """Extract the assigned category definition of a node type"""

    @staticmethod
    def compute(db) -> bool:
        """Compute only extracts the category name and puts it into the output"""

        db.outputs.category = db.abi_node.get_node_type().get_metadata(ogn.MetadataKeys.CATEGORIES)
        return True
