Creates placement_group group if necessary. Returns True if new placement_group
  group was created, False otherwise.
762423
def placement_group_setup(group_name):
  """"""

  existing_placement_groups = u.get_placement_group_dict()

  group = existing_placement_groups.get(group_name, None)
  if group:
    assert group.state == 'available'
    assert group.strategy == 'cluster'
    print("Reusing group ", group.name)
    return group

  print("Creating group " + group_name)
  ec2 = u.get_ec2_resource()
  group = ec2.create_placement_group(GroupName=group_name, Strategy='cluster')
  return group
817232
def get_placement_group_dict():
  """"""

  client = get_ec2_client()
  response = client.describe_placement_groups()
  assert is_good_response(response)

  result = OrderedDict()
  ec2 = get_ec2_resource()
  for placement_group_response in response['PlacementGroups']:
    key = placement_group_response['GroupName']
    if key in result:
      util.log(f"Warning: Duplicate placement_group group {key}")
      if DUPLICATE_CHECKING:
        assert False
    result[key] = ec2.PlacementGroup(key)
  return result
905610
@Override
    public CommandGroup createCommandGroup(String groupId, Object[] members, CommandConfigurer configurer) {
		return createCommandGroup(groupId, members, false, configurer);
	}
146325
public OperationFuture<Group> create(GroupConfig groupConfig) {
        checkNotNull(groupConfig, "GroupConfig must be not null");
        checkNotNull(groupConfig.getName(), "Name of GroupConfig must be not null");
        checkNotNull(groupConfig.getParentGroup(), "ParentGroup of GroupConfig must be not null");

        GroupMetadata group = client.createGroup(
                converter.createGroupRequest(groupConfig, idByRef(groupConfig.getParentGroup()),
                    groupConfig.getCustomFields() == null || groupConfig.getCustomFields().size() == 0 ?
                        null : client.getCustomFields()
                ));

        return new OperationFuture<>(
            Group.refById(group.getId()),
            new NoWaitingJobFuture()
        );
    }
401086
def usergroups_create(self, *, name: str, **kwargs) -> SlackResponse:
        
        self._validate_xoxp_token()
        kwargs.update({"name": name})
        return self.api_call("usergroups.create", json=kwargs)
877045
async def create(gc: GroupControl, name, slaves):
    """"""
    click.echo("Creating group %s with slaves: %s" % (name, slaves))
    click.echo(await gc.create(name, slaves))
779590
def create_record_set_groups(self, record_set_group_dicts):
        """"""
        record_set_groups = []
        for name, group in record_set_group_dicts.iteritems():
            # pop removes the 'Enabled' key and tests if True.
            if group.pop('Enabled', True):
                record_set_groups.append(
                    self.create_record_set_group(name, group)
                )
        return record_set_groups
436844
def create_group(self, group_name, path='/'):
        
        params = {'GroupName' : group_name,
                  'Path' : path}
        return self.get_response('CreateGroup', params)
64069
public boolean hasGroupsInOtherOus() {

        if (m_hasGroupsInOtherOus == null) {
            // lazzy initialization
            m_hasGroupsInOtherOus = Boolean.FALSE;
            try {
                List<CmsGroup> groups = getGroups(true);
                Iterator<CmsGroup> itGroups = groups.iterator();
                while (itGroups.hasNext()) {
                    CmsGroup group = itGroups.next();
                    if (!group.getOuFqn().equals(getParamOufqn())) {
                        m_hasGroupsInOtherOus = Boolean.TRUE;
                        break;
                    }
                }
            } catch (Exception e) {
                // ignore
            }
        }
        return m_hasGroupsInOtherOus.booleanValue();
    }
289389
def create_group(groupname, gid, system=True):
    
    sudo(addgroup(groupname, gid, system))
1053808
def Create(self,name,description=None):
		

		if not description:  description = name

		r = clc.v2.API.Call(
			'POST',
			'groups/%s' % (self.alias),
			{'name': name, 'description': description, 'parentGroupId': self.id},
			session=self.session)
		return(Group(id=r['id'],alias=self.alias,group_obj=r,session=self.session))
1271618
def get_cluster_placement_group(self):
    
    placement_group_name = 'pg-%s' % (self._name)
    try:
      self.ec2.create_placement_group(placement_group_name, 
                                                 strategy = 'cluster')
    except:
      pass
    return placement_group_name
767396
def create_secgroup(self, name, desc):
        
        self.nova.security_groups.create(name, desc)
692614
def create
      @group = Group.new(group_params.except(:user_id))
      authorize! :create, @group

      if @group.save
        redirect_to @group,
                    notice: "Group was successfully created."
      else
        render :new
      end
    end
1052725
def group_membership_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/group_memberships.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
18857
def move_group(self, group = None, parent = None):
        

        if group is None or type(group) is not v1Group:
            raise KPError("A valid group must be given.")
        elif parent is not None and type(parent) is not v1Group:
            raise KPError("parent must be a v1Group.")
        elif group is parent:
            raise KPError("group and parent must not be the same group")
        if parent is None:
            parent = self.root_group
        if group in self.groups:
            self.groups.remove(group)
            group.parent.children.remove(group)
            group.parent = parent
            if parent.children:
                if parent.children[-1] is self.groups[-1]:
                    self.groups.append(group)
                else:
                    new_index = self.groups.index(parent.children[-1]) + 1
                    self.groups.insert(new_index, group)
            else:
                new_index = self.groups.index(parent) + 1
                self.groups.insert(new_index, group)
            parent.children.append(group)
            if parent is self.root_group:
                group.level = 0
            else:
                group.level = parent.level + 1
            if group.children:
                self._move_group_helper(group)
            group.last_mod = datetime.now().replace(microsecond=0)
            return True
        else:
            raise KPError("Didn't find given group.")
518518
function groupExists(group) {
  if (isPlatform('windows')) {
    throw new Error('Don\'t know how to check for group existence on Windows');
  } else {
    if (_.isEmpty(findGroup(group, {refresh: true, throwIfNotFound: false}))) {
      return false;
    } else {
      return true;
    }
  }
}