Looks at all the wells in turn and returns the highest thing
        in the alias table.

        Args:
            mnemonics (list)
            alias (dict)

        Returns:
            list. A list of lists.
178543
def get_mnemonics(self, mnemonics, uwis=None, alias=None):
        
        # Let's not do the nested comprehension...
        uwis = uwis or self.uwis
        wells = [w for w in self.__list if w.uwi in uwis]
        all_wells = []
        for w in wells:
            this_well = [w.get_mnemonic(m, alias=alias) for m in mnemonics]
            all_wells.append(this_well)
        return all_wells
668808
def get_aliases(self, includename=True):
        
        # empty list if doesnt exist
        alias_quanta = self.get(self._KEYS.ALIAS, [])
        aliases = [aq[QUANTITY.VALUE] for aq in alias_quanta]
        if includename and self[self._KEYS.NAME] not in aliases:
            aliases = [self[self._KEYS.NAME]] + aliases
        return aliases
888599
def aliases(self):
        
        aliases = self.cp.items('aliases')
        alias_dict = dict()

        for alias, meaning in aliases:
            try:
                meaning = shlex.split(meaning)
                real_subcommand = meaning[0]
                alias_args = meaning[1:]
                alias_dict[alias] = (real_subcommand, alias_args)
            except ValueError as verr:
                alias_dict[alias] = str(verr)

        return alias_dict
341654
def index_tuple(self,tables_dict,index,is_set):
    ""
    if not self.aonly_resolved: raise RuntimeError('resolve_aonly() before querying nix')
    with tables_dict.tempkeys():
      tables_dict.update(self.aonly) # todo: find spec support for aliases overwriting existing tables. (more likely, it's an error)
      index = index.name if isinstance(index,sqparse2.NameX) else index
      if isinstance(index,basestring):
        candidates = [t for t in self.table_order if any(f.name==index for f in tables_dict[t].fields)]
        if len(candidates)!=1: raise ColumnNameError(("ambiguous_column" if candidates else "no_such_column"),index)
        tname, = candidates
        return self.table_order.index(tname), tables_dict[tname].lookup(index).index
      elif isinstance(index,sqparse2.AttrX):
        if index.parent.name not in self.aliases: raise TableNameError('table_notin_x',index.parent,self.aliases)
        tname = self.aliases[index.parent.name]
        tindex = self.table_order.index(tname)
        if isinstance(index.attr,sqparse2.AsterX):
          if is_set: raise ValueError('cant_set_asterisk') # todo: better error class
          else: return (tindex,)
        else: return (tindex,tables_dict[tname].lookup(index.attr).index)
        # todo: stronger typing here. make sure both fields of the AttrX are always strings.
      else: raise TypeError(type(index)) # pragma: no cover
21719
def all(self, data={}, **kwargs):
        "
        return super(Order, self).all(data, **kwargs)
912764
def index(self, alias):
        
        clone = self._clone()
        clone._index = alias
        return clone
464145
def depth(sequence, func=max, _depth=0):
    
    if isinstance(sequence, dict):
        sequence = list(sequence.values())
    depth_list = [depth(item, func=func, _depth=_depth + 1)
                  for item in sequence if (isinstance(item, dict) or util_type.is_listlike(item))]
    if len(depth_list) > 0:
        return func(depth_list)
    else:
        return _depth
1011955
def wells(self, *args, **kwargs):
        

        if len(args) and isinstance(args[0], list):
            args = args[0]

        new_wells = None
        if not args and not kwargs:
            new_wells = WellSeries(self.get_children_list())
        elif len(args) > 1:
            new_wells = WellSeries([self.well(n) for n in args])
        elif 'x' in kwargs or 'y' in kwargs:
            new_wells = self._parse_wells_x_y(*args, **kwargs)
        else:
            new_wells = self._parse_wells_to_and_length(*args, **kwargs)

        if len(new_wells) == 1:
            return new_wells[0]
        return new_wells
751745
def get_category_by_alias(self, alias):
        
        self._cache_init()
        return self._cache_get_entry(self.CACHE_NAME_ALIASES, alias, None)
531231
def alias(*aliases):
    

    def decorate(f):
        if not hasattr(f, "aliases"):
            f.aliases = []
        f.aliases += aliases
        return f

    return decorate
1352438
def aliased_slot_names(self, slot_names: List[SlotDefinitionName]) -> Set[str]:
        
        return {self.aliased_slot_name(sn) for sn in slot_names}
59433
def retrieve_import_alias_mapping(names_list):
    """"""
    import_alias_names = dict()

    for alias in names_list:
        if alias.asname:
            import_alias_names[alias.asname] = alias.name
    return import_alias_names
1029499
def get_popular_aliases(self, *args, **kwargs):
        
        aliases_count_total = defaultdict(int)
        aliases_counts = self._timesheets_callback('get_popular_aliases')(*args, **kwargs)

        for aliases_count in aliases_counts:
            for alias, count in aliases_count:
                aliases_count_total[alias] += count

        sorted_aliases_count_total = sorted(aliases_count_total.items(), key=lambda item: item[1], reverse=True)

        return sorted_aliases_count_total
732197
def index(self, value, start=None, stop=None):
        """"""
        return self.__alias__.index(value, start, stop)
125447
def maximum(self, vars_list: List[str]) -> 'TensorFluent':
        '''
        '''
        return self._aggregation_op(tf.reduce_max, self, vars_list)
442299
def root_hypernyms(self):
        
        visited = set()
        hypernyms_next_level = set(self.hypernyms())
        current_hypernyms = set(hypernyms_next_level)

        while len(hypernyms_next_level) > 0:
            current_hypernyms = set(hypernyms_next_level)
            hypernyms_next_level = set()
          
            for synset in current_hypernyms:
                if synset in visited:
                    continue
                visited.add(synset)
                hypernyms_next_level |= set(synset.hypernyms())

        return list(current_hypernyms)
271369
def get_alias(self, alias):
        
        aliases = self.get_aliases()
        if alias in aliases.alias:
            settings = self.settings.copy()
            settings.alias = alias
            settings.index = alias
            return Index(read_only=True, kwargs=settings, cluster=self)
        Log.error("Can not find any index with alias {{alias_name}}",  alias_name= alias)