Returns a (uid, gid, pid) tuple
178209
def fuse_get_context():
    ''

    ctxp = _libfuse.fuse_get_context()
    ctx = ctxp.contents
    return ctx.uid, ctx.gid, ctx.pid
378152
def get_tuple(nuplet, index, default=None):
    
    if nuplet is None:
        return default
    try:
        return nuplet[index]
    except IndexError:
        return default
284892
def create_guid(self, collection=None):
        
        guid = str(uuid.uuid4())
        if collection:
            return str.join('/', [collection, guid])
        else:
            return guid
637086
def pid(self, value):
        """"""
        self.bytearray[self._get_slicers(0)] = bytearray(c_int32(value or 0))
942481
def gid
      return group.kind_of?(Integer) ? group : Etc.getgrnam(group.to_s).gid if group
      return Etc.getpwuid(uid).gid if using_login?
      nil
    end
545800
private String getExtends(String pid) {
        RegistryEntry re = getRegistryEntry(pid);
        return re == null ? null : re.getExtends();
    }
1102435
def _parse_proc_pid_cgroup(content):
    
    for ownCgroup in content:
        #each line is "id:subsystem,subsystem:path"
        ownCgroup = ownCgroup.strip().split(':')
        try:
            path = ownCgroup[2][1:] # remove leading /
        except IndexError:
            raise IndexError("index out of range for " + str(ownCgroup))
        for subsystem in ownCgroup[1].split(','):
            yield (subsystem, path)
201790
def id_to_name(id):
    
    name = pdgid_names.get(id)
    if not name:
        name = repr(id)
    return name
1020456
def get_tcod_path_ffi(self) -> Tuple[Any, Any, Tuple[int, int]]:
        """"""
        return self._CALLBACK_P, ffi.new_handle(self._userdata), self.shape
814472
def parse_prefix(identifier):
    
    pf, id = (), identifier
    if "|" in identifier:
        pf, id = tuple(identifier.split('|')[:-1]), identifier.split('|')[-1]

    return pf, id
757070
def get_list_w_id2nts(ids, id2nts, flds, dflt_null=""):
    """"""
    combined_nt_list = []
    # 1. Instantiate namedtuple object
    ntobj = cx.namedtuple("Nt", " ".join(flds))
    # 2. Fill dict with namedtuple objects for desired ids
    for item_id in ids:
        # 2a. Combine various namedtuples into a single namedtuple
        nts = [id2nt.get(item_id) for id2nt in id2nts]
        vals = _combine_nt_vals(nts, flds, dflt_null)
        combined_nt_list.append(ntobj._make(vals))
    return combined_nt_list
677059
def _get_goids(gostr):
        """"""
        if 'GO:' in gostr:
            return gostr.split(',')
        elif os.path.exists(gostr):
            return GetGOs().get_goids(None, gostr, sys.stdout)
209811
def get_pid(self, uri):
        
        # if the wikibase is wikidata, and we give a wikidata uri or a PID with no URI specified:
        if (self.sparql_endpoint_url == 'https://query.wikidata.org/sparql' and
                (uri.startswith("P") or uri.startswith("http://www.wikidata.org/entity/"))):
            # don't look up anything, just return the same value
            return uri
        if uri.startswith("P"):
            uri = "http://www.wikidata.org/entity/" + uri
        return self.URI_PID[uri]
1307128
def get_gid_list(user, include_default=True):
    '''
    
    '''
    if HAS_GRP is False or HAS_PWD is False:
        return []
    gid_list = list(
        six.itervalues(
            get_group_dict(user, include_default=include_default)
        )
    )
    return sorted(set(gid_list))
849766
def squid_to_guid(squid):
    '''
    
    '''
    squid_pattern = re.compile(r'^(\w{8})(\w{4})(\w{4})(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)(\w\w)$')
    squid_match = squid_pattern.match(squid)
    guid = ''
    if squid_match is not None:
        guid = '{' + \
               squid_match.group(1)[::-1]+'-' + \
               squid_match.group(2)[::-1]+'-' + \
               squid_match.group(3)[::-1]+'-' + \
               squid_match.group(4)[::-1]+squid_match.group(5)[::-1] + '-'
        for index in range(6, 12):
            guid += squid_match.group(index)[::-1]
        guid += '}'
    return guid
760419
def gid_to_group(gid):
    '''
    
    '''
    try:
        gid = int(gid)
    except ValueError:
        # This is not an integer, maybe it's already the group name?
        gid = group_to_gid(gid)

    if gid == '':
        # Don't even bother to feed it to grp
        return ''

    try:
        return grp.getgrgid(gid).gr_name
    except (KeyError, NameError):
        # If group is not present, fall back to the gid.
        return gid
870980
def micro_indices(self):
        """"""
        return tuple(sorted(idx for part in self.partition for idx in part))