Get missing names grouped by namespace.
349857
def calculate_incorrect_name_dict(graph: BELGraph) -> Mapping[str, List[str]]:
    """"""
    missing = defaultdict(list)

    for namespace, name in _iterate_namespace_name(graph):
        missing[namespace].append(name)

    return dict(missing)
246098
def get_all_names(self):
        """"""
        result = set()
        for module in self.names:
            result.update(set(self.names[module]))
        return result
1131693
def _get_names(self, collector):
        """"""
        desc_func = None
        # If there's a describe function, use it.
        try:
            desc_func = collector.describe
        except AttributeError:
            pass
        # Otherwise, if auto describe is enabled use the collect function.
        if not desc_func and self._auto_describe:
            desc_func = collector.collect

        if not desc_func:
            return []

        result = []
        type_suffixes = {
            'counter': ['_total', '_created'],
            'summary': ['', '_sum', '_count', '_created'],
            'histogram': ['_bucket', '_sum', '_count', '_created'],
            'gaugehistogram': ['_bucket', '_gsum', '_gcount'],
            'info': ['_info'],
        }
        for metric in desc_func():
            for suffix in type_suffixes.get(metric.type, ['']):
                result.append(metric.name + suffix)
        return result
207236
def absent(self, name, rdtype=None):
        """"""

        if isinstance(name, (str, unicode)):
            name = dns.name.from_text(name, None)
        if rdtype is None:
            rrset = self.find_rrset(self.answer, name,
                                    dns.rdataclass.NONE, dns.rdatatype.ANY,
                                    dns.rdatatype.NONE, None,
                                    True, True)
        else:
            if isinstance(rdtype, (str, unicode)):
                rdtype = dns.rdatatype.from_text(rdtype)
            rrset = self.find_rrset(self.answer, name,
                                    dns.rdataclass.NONE, rdtype,
                                    dns.rdatatype.NONE, None,
                                    True, True)
827882
def _get_names(names, types):
    
    if types == "":
        try:
            names, types = names.split(":")
        except:
            pass
    return names.split(","), types
183336
def names(self):
        """"""
        names = []
        if isinstance(self.source, ast.List):
            for node in self.source.elts:
                if isinstance(node, ast.Str):
                    names.append(node.s)
        return names
1321451
def capture_url_missing_namespace(self, node):
        
        for arg in node.args:
            if not(isinstance(arg, ast.Call) and isinstance(arg.func, ast.Name)):
                continue
            if arg.func.id != 'include':
                continue
            for keyword in arg.keywords:
                if keyword.arg == 'namespace':
                    return

            return DJ05(
                lineno=node.lineno,
                col=node.col_offset,
            )
855409
def completenames(self, text, *ignored):
        """"""
        return sorted(cmd.Cmd.completenames(self, text, *ignored) + self.argparse_names(text))
395075
def missing_count(self):
        """"""
        if self.means:
            return self.means.missing_count
        return self._cube_dict["result"].get("missing", 0)
1150824
def get_namespace_from_name(name):
    
    if not re.match(NAMESPACE_PATTERN, name):
        sys.exit(("Argument '%s' doesn't match any recognized pattern:\n"
                  "\tfloyd [data] init <project_or_dataset_name>\n"
                  "\tfloyd [data] init <namespace>/<project_or_dataset_name>\n"
                  "\tfloyd [data] init <namespace>/[projects|dataset]/<project_or_dataset_name>\n"
                  "\n Note: Argument can only contain alphanumeric, hyphen-minus '-' , underscore '_' and dot '.' characters."
                  ) % name)

    name_parts = name.split("/", 2)
    if len(name_parts) > 1:
        return name_parts[0], name_parts[-1]
    else:
        return current_username(), name
1328895
def get_names(graph):
    
    rv = defaultdict(set)
    for namespace, name in _identifier_filtered_iterator(graph):
        rv[namespace].add(name)
    return dict(rv)
407826
def get_names_in_namespace( self, namespace_id, offset=None, count=None ):
        
        if offset is not None and offset < 0:
            offset = None 

        if count is not None and count < 0:
            count = None 

        cur = self.db.cursor()
        names = namedb_get_names_in_namespace( cur, namespace_id, self.lastblock, offset=offset, count=count )
        return names
674489
def display_list_by_prefix(names_list, starting_spaces=0):
  """"""
  cur_prefix, result_lines = None, []
  space = " " * starting_spaces
  for name in sorted(names_list):
    split = name.split("_", 1)
    prefix = split[0]
    if cur_prefix != prefix:
      result_lines.append(space + prefix + ":")
      cur_prefix = prefix
    result_lines.append(space + "  * " + name)
  return "\n".join(result_lines)
1280266
def get_names():
    """"""
    res = list(cmaps.keys())
    res = sorted(res, key=lambda s: s.lower())
    return res
1158031
def namedb_get_name(cur, name, current_block, include_expired=False, include_history=True, only_registered=True):
    

    if not include_expired:

        unexpired_fragment, unexpired_args = namedb_select_where_unexpired_names(current_block, only_registered=only_registered)
        select_query = "SELECT name_records.* FROM name_records JOIN namespaces ON name_records.namespace_id = namespaces.namespace_id " + \
                       "WHERE name = ? AND " + unexpired_fragment + ";"
        args = (name, ) + unexpired_args

    else:
        select_query = "SELECT * FROM name_records WHERE name = ?;"
        args = (name,)

    # log.debug(namedb_format_query(select_query, args))

    name_rows = namedb_query_execute( cur, select_query, args )
    name_row = name_rows.fetchone()
    if name_row is None:
        # no such name
        return None 

    name_rec = {}
    name_rec.update( name_row )
    
    if include_history:
        name_history = namedb_get_history( cur, name )
        name_rec['history'] = name_history

    return name_rec
912012
def get_namespaces_from_names(name, all_names):
    """"""
    names = configuration_namespaces.keys() if all_names else [name]
    for name in names:
        yield get_namespace(name)
724203
def p_namelist(self,t):
    ""
    if len(t)==2: t[0] = [t[1]]
    elif len(t)==4: t[0] = t[1] + [t[3]]
    else: raise NotImplementedError('unk_len',len(t)) # pragma: no cover