def _init_api(namespace, target_module_name=None):
    """Initialize api for a given module name

    namespace : str
       The namespace of the source registry

    target_module_name : str
       The target module name if different from namespace
    """
    target_module_name = target_module_name if target_module_name else namespace
    if namespace.startswith("dgl."):
        return _init_api_prefix(target_module_name, namespace[4:])
    else:
        return _init_api_prefix(target_module_name, namespace)
Initialize api for a given module name

    namespace : str
       The namespace of the source registry

    target_module_name : str
       The target module name if different from namespace
    
python/dgl/_ffi/function.py