It returns a CGroup object which is pointed by the fullpath.
5325
def get_cgroup(fullpath):
    
    # Canonicalize symbolic links
    fullpath = os.path.realpath(fullpath)

    status = SubsystemStatus()
    name = None
    for name, path in status.paths.items():
        if path in fullpath:
            break
    else:
        raise Exception('Invalid path: ' + fullpath)
    subsys = _get_subsystem(name)

    return CGroup(subsys, fullpath)
470404
def group(self):
        ""
        if self._group:
            return self._group
        group =  get_ndmapping_label(self, 'group') if len(self) else None
        if group is None:
            return type(self).__name__
        return group
1151533
def main_group(self, i):
        """"""

        current = []
        while True:
            try:
                t = next(i)
                current.extend(self.normal(t, i))
            except StopIteration:
                break
        return current
1134413
public Group getGroup(String groupName) {
        Group result = null;
        for (Group item : getGroupsList()) {
            if (item.getName().equals(groupName)) {
                result = item;
            }
        }
        return result;
    }
502450
function getFileGroup(files) {
  /**
   * Capture the group id from the first file in the files array.
   */
  const groupId = new RegExp(`^.+/([^/]+~${files.length})/nth/`).exec(files[0])[1];

  /**
   * The `openDialog` method handles the jQuery promise object returned by
   * `fileFrom`, but requires the promise returned by `loadFileGroup` to provide
   * the result of it's `done` method.
   */
  return new Promise(resolve => uploadcare.loadFileGroup(groupId).done(group => resolve(group)));
}
65340
function findObject(c, obj, path, alreadyParsed) {
    if (!path) {
        path = [];
    }

    // Recursive reference : boooh, very wrong
    if (!alreadyParsed) {
        alreadyParsed = [];
    }
    var keys = Object.keys(obj);
    alreadyParsed.push(obj);
    for (var key = 0; key < keys.length; key++) {
        var i = keys[key];
        if (i == "NativeModule" && isElectron) {
            break;
        }
        if (obj[i] === c) {
            path.push(i);
            return path;
        } else if (["object", "function"].indexOf(typeof(obj[i])) >= 0 && alreadyParsed.indexOf(obj[i]) == -1 && obj[i] !== null && obj[i] !== undefined) {
            path.push(i);
            var founded = findObject(c, obj[i], path, alreadyParsed);
            if (founded) {
                return founded;
            } else {
                path.pop();
            }
        }
    };
    return null;
}
74409
@Override
	public List<CPFriendlyURLEntry> findByG_C_C(long groupId, long classNameId,
		long classPK) {
		return findByG_C_C(groupId, classNameId, classPK, QueryUtil.ALL_POS,
			QueryUtil.ALL_POS, null);
	}
225549
def C(self):
        '''
        
        '''
        return Point(self.maxX, self.maxY, self.origin.z)
627361
@Override
	public List<CPDefinitionOptionRel> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
313479
public static final FileAttribute<GroupPrincipal> getGroupAsAttribute(String group) throws IOException
    {
        if (supports("posix"))
        {
            UserPrincipalLookupService upls = FileSystems.getDefault().getUserPrincipalLookupService();
            GroupPrincipal grp = upls.lookupPrincipalByGroupName(group);
            return new FileAttributeImpl<>("posix:group", grp);
        }
        else
        {
            return null;
        }
    }
2811
function group() {
    var ret = this.seq(
        this.stringf('('),
        this.manyf(c_wsp),
        alternation,
        this.manyf(c_wsp),
        this.stringf(')'));
    return new ast.Group(ret[3]);
}
542558
@Override
    public IEntityGroup find(String key) throws GroupsException {
        if (log.isDebugEnabled()) {
            log.debug(DEBUG_CLASS_NAME + ".find(): group key: " + key);
        }

        String path = getFilePathFromKey(key);
        File f = new File(path);

        GroupHolder groupHolder = cacheGet(key);

        if (groupHolder == null || (groupHolder.getLastModified() != f.lastModified())) {
            if (log.isDebugEnabled()) {
                log.debug(
                        DEBUG_CLASS_NAME
                                + ".find(): retrieving group from file system for "
                                + path);
            }

            if (!f.exists()) {
                if (log.isDebugEnabled()) {
                    log.debug(DEBUG_CLASS_NAME + ".find(): file does not exist: " + path);
                }
                return null;
            }

            IEntityGroup group = newInstance(f);
            groupHolder = new GroupHolder(group, f.lastModified());
            cachePut(key, groupHolder);
        }
        return groupHolder.getGroup();
    }
393438
def _parse_proc_cgroups(self):
        """
        #subsys_name	hierarchy	num_cgroups	enabled
        cpuset	0	1	1
        ns	0	1	1
        cpu	1	10	1
        cpuacct	0	1	1
        memory	0	1	1
        devices	0	1	1
        freezer	0	1	1
        net_cls	0	1	1
        """
        for line in fileops.readlines('/proc/cgroups'):
            m = self._RE_CGROUPS.match(line)
            if m is None:
                continue

            name = m.group('name')
            hierarchy = int(m.group('hier'))
            n_cgroups = int(m.group('n'))
            if m.group('enabled') == '1':
                enabled = True
            else:
                enabled = False
            if name not in self:
                self[name] = {}
            self[name]['name'] = name
            self[name]['hierarchy'] = hierarchy
            self[name]['num_cgroups'] = n_cgroups
            self[name]['enabled'] = enabled
916537
@Override
    public Node getGroup(final String cn) {
        try {
            String query = "(&(objectClass=" + groupObjectClass + ")(" + groupIdentifyer + "=" + cn + "))";
            SearchResult searchResult;
            Attributes attributes;
            SearchControls controls = new SearchControls();
            controls.setReturningAttributes(new String[]{LdapKeys.ASTERISK, LdapKeys.MODIFY_TIMESTAMP, LdapKeys.MODIFIERS_NAME, LdapKeys.ENTRY_UUID});
            controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
            NamingEnumeration<SearchResult> results = ctx.search("", query, controls);
            queryCount++;
            if (results.hasMore()) {
                LdapGroup group = new LdapGroup(cn, this);
            	searchResult = results.next();
                group.setDn(searchResult.getNameInNamespace());
                attributes = searchResult.getAttributes();
                group = fillAttributesInGroup((LdapGroup) group, attributes);
                return group;
            }
        } catch (NamingException ex) {
            handleNamingException(instanceName + ":" + cn, ex);
        }
       return new LdapGroup();
    }
496392
def show_endpoint_group(self, endpointgroup, **_params):
        """"""
        return self.get(self.endpoint_group_path % endpointgroup,
                        params=_params)
1173262
def member_of(self, group):
        
        if isinstance(group, Group):
            group = group.name
        return self.groups.filter(name=group).exists()
2729
public Collection<Node> getAssociatedPGroup(Node u) {
        for (Collection<Node> pGrp : pGroups) {
            if (pGrp.contains(u)) {
                return pGrp;
            }
        }
        return Collections.emptySet();
    }