get all parts of module name apart from first
320227
private String tail(String moduleName) {
        if (moduleName.indexOf(MODULE_NAME_SEPARATOR) > 0) {
            return moduleName.substring(moduleName.indexOf(MODULE_NAME_SEPARATOR) + 1);
        } else {
            return "";
        }
    }
420393
def get_module_names(package_path, pattern="lazy_*.py*"):
  
  package_contents = glob(os.path.join(package_path[0], pattern))
  relative_path_names = (os.path.split(name)[1] for name in package_contents)
  no_ext_names = (os.path.splitext(name)[0] for name in relative_path_names)
  return sorted(set(no_ext_names))
802495
def parse(self, module):
        """"""
        matches = self.RE_TYPE.finditer(module.contents)
        result = {}

        for match in matches:
            name = match.group("name")
            modifiers = match.group("modifiers")
            if modifiers is not None:
                cleanmods = re.split("[\s,]+", modifiers.strip())
            else:
                cleanmods = []

            contents = match.group("contents")
            result[name.lower()] = self._process_type(name, cleanmods, contents, module, match)
            if "public" in result[name.lower()].modifiers:
                module.publics[name.lower()] = 1

        #Set the types we found in the module and then move the embedded
        #ones into their correct parent executables.
        module.types = result
        module.update_embedded("types")
1052348
def fully_qualified_name(obj, sep='.'):
    """"""
    if inspect.isclass(obj):
        return obj.__module__ + sep + obj.__name__
    else:
        return obj.__module__ + sep + obj.__class__.__name__
819795
Map<String, JSModule> getModulesByName() {
    Map<String, JSModule> result = new HashMap<>();
    for (JSModule m : modules) {
      result.put(m.getName(), m);
    }
    return result;
  }
791071
def name_parts(self):
        """"""

        default = PartialMixin.ANY

        np = ([(k, default, True)
               for k, _, _ in super(NameQuery, self).name_parts]
              +
              [(k, default, True)
               for k, _, _ in Name._generated_names]
              )

        return np
343932
def get_short_module_name(module_name, obj_name):
    
    scope = {}
    try:
        # Find out what the real object is supposed to be.
        exec('from %s import %s' % (module_name, obj_name), scope, scope)
        real_obj = scope[obj_name]
    except Exception:
        return module_name

    parts = module_name.split('.')
    short_name = module_name
    for i in range(len(parts) - 1, 0, -1):
        short_name = '.'.join(parts[:i])
        scope = {}
        try:
            exec('from %s import %s' % (short_name, obj_name), scope, scope)
            # Ensure shortened object is the same as what we expect.
            assert real_obj is scope[obj_name]
        except Exception:  # libraries can throw all sorts of exceptions...
            # get the last working module name
            short_name = '.'.join(parts[:(i + 1)])
            break
    return short_name
863543
def _module_name_from_previous_frame(num_frames_back):
    
    frm = inspect.stack()[num_frames_back + 1]
    return inspect.getmodule(frm[0]).__name__
999995
def _module_name(self) -> str:
        """"""
        name = self.f.__module__
        if name == '__main__':
            return importer.main_module_name()
        return name
280993
def _get_mod_ns(name, fullname, includeprivate):
    """"""
    ns = {  # template variables
        'name': name, 'fullname': fullname, 'members': [], 'functions': [],
        'classes': [], 'exceptions': [], 'subpackages': [], 'submodules': [],
        'doc': None}
    p = 0
    if includeprivate:
        p = 1
    mod = importlib.import_module(fullname)
    ns['members'] = _get_members(mod)[p]
    ns['functions'] = _get_members(mod, typ='function')[p]
    ns['classes'] = _get_members(mod, typ='class')[p]
    ns['exceptions'] = _get_members(mod, typ='exception')[p]
    ns['data'] = _get_members(mod, typ='data')[p]
    ns['doc'] = mod.__doc__
    return ns
1155098
function getFirstNgModuleName(source) {
    // First, find the @NgModule decorators.
    const ngModulesMetadata = getDecoratorMetadata(source, 'NgModule', '@angular/core');
    if (ngModulesMetadata.length === 0) {
        return undefined;
    }
    // Then walk parent pointers up the AST, looking for the ClassDeclaration parent of the NgModule
    // metadata.
    const moduleClass = findClassDeclarationParent(ngModulesMetadata[0]);
    if (!moduleClass || !moduleClass.name) {
        return undefined;
    }
    // Get the class name of the module ClassDeclaration.
    return moduleClass.name.text;
}
427241
private List<String> extractIndexNames() {

        List<String> modules = new ArrayList<String>();

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(getParamIndexes())) {
            StringTokenizer tok = new StringTokenizer(getParamIndexes(), ",");
            while (tok.hasMoreTokens()) {
                String module = tok.nextToken();
                modules.add(module);
            }
        }
        return modules;
    }
107487
def _module_parents(module_name):
        '''
        
        '''
        spl = module_name.split('.')
        for i in range(len(spl), 0, -1):
            yield '.'.join(spl[0:i])
        if module_name:
            yield ''
1367866
def get_name(component):
    
    if six.callable(component):
        name = getattr(component, "__qualname__", component.__name__)
        return '.'.join([component.__module__, name])
    return str(component)
544337
def all_modules_subpattern():
    
    """
    names_dot_attrs = [mod.split(u".") for mod in MAPPING]
    ret = u"( " + u" | ".join([dotted_name % (simple_name % (mod[0]),
                                            simple_attr % (mod[1])) for mod in names_dot_attrs])
    ret += u" | "
    ret += u" | ".join([simple_name % (mod[0]) for mod in names_dot_attrs if mod[1] == u"__init__"]) + u" )"
    return ret
859011
def get_module_all(node):
    
    all_ = None

    if "__all__" in node.locals:
        assigned = next(node.igetattr("__all__"))
        if assigned is not astroid.Uninferable:
            all_ = []
            for elt in getattr(assigned, "elts", ()):
                try:
                    elt_name = next(elt.infer())
                except astroid.InferenceError:
                    continue

                if elt_name is astroid.Uninferable:
                    continue

                if isinstance(elt_name, astroid.Const) and isinstance(
                    elt_name.value, _STRING_TYPES
                ):
                    all_.append(elt_name.value)

    return all_
553936
protected function prefixAllModuleNames()
    {
        foreach ($this->data->rawData['modules'] as $moduleId => $module) {

            $this->prefixModuleName($moduleId);
        }
    }