@classmethod
    def get_resource_type(cls, ref):
        try:
            if not cls.is_reference(ref):
                raise ValueError('%s is not a valid reference.' % ref)

            return ref.split(cls.separator, 1)[0]
        except (ValueError, IndexError, __HOLE__):
            raise common_models.InvalidReferenceError(ref=ref)
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/models/db/policy.py/PolicyTypeReference.get_resource_type