def __call__(cls, *args, **kwargs):
        """Executes on 'inst = extension(__file__)', once the FuncExtension
        class is instantiate, overwrite the __init__() method and add the
        instance into life-cycle hooks.
        """
        scope = ExtensionMeta._get_extension_scope(cls)

        # Only register function extension here
        if scope is ExtensionScope.FUNCTION:
            instance = super(ExtensionMeta, cls).__call__(*args, **kwargs)
            ExtensionMeta._register_function_extension(instance)
            return instance
        elif scope is ExtensionScope.APPLICATION:
            raise FunctionExtensionException(
                f'Python worker extension with scope:{scope} should not be'
                'instantiable. Please access via class method directly.'
            )
        else:
            raise FunctionExtensionException(
                f'Python worker extension:{cls.__name__} is not properly '
                'implemented from AppExtensionBase or FuncExtensionBase.'
            )
Executes on 'inst = extension(__file__)', once the FuncExtension
        class is instantiate, overwrite the __init__() method and add the
        instance into life-cycle hooks.
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/functions/extension/extension_meta.py