Return an array of subcomponent types.
778866
public function requiredComponents() {
    $components = parent::requiredComponents();

    // Change the body of the form builder.
    $form_name = $this->component_data['form_id'];
    $form_builder = $form_name;
    $form_validate  = $form_name . '_validate';
    $form_submit    = $form_name . '_submit';

    // Override the form builder's location and code.
    $components[$form_builder]['containing_component'] = '%requester:%module.admin.inc';
    $components[$form_builder]['body'] = array(
      "£form['%module_variable_foo'] = array(",
      "  '#type' => 'textfield',",
      "  '#title' => t('Foo'),",
      "  '#default_value' => variable_get('%module_variable_foo', 42),",
      "  '#required' => TRUE,",
      ");",
      "",
      "return system_settings_form(£form);",
    );

    // Remove the form validation and submit handlers, as Drupal core takes care
    // of this for system settings.
    unset($components[$form_validate]);
    unset($components[$form_submit]);

    // This takes care of adding hook_menu() and so on.
    $components['menu_item'] = array(
      'component_type' => 'RouterItem',
      'path' => 'admin/config/TODO-SECTION/%module',
      'title' => 'Administer %readable',
      'description' => 'Configure settings for %readable.',
      'page callback' => 'drupal_get_form',
      'page arguments' => "array('{$form_name}')",
      'access arguments' => "array('administer %module')",
      'file' => '%module.admin.inc',
    );

    $components['Permission'] = array(
      'component_type' => 'Permission',
      'permission' => 'administer %module',
    );

    $components['info_configuration'] = array(
      'component_type' => 'InfoProperty',
      'property_name' => 'configure',
      'property_value' => 'admin/config/TODO-SECTION/%module',
    );

    return $components;
  }
1259249
def subpackets(*items):
    """"""
    prefixed = [subpacket_prefix_len(item) for item in items]
    return util.prefix_len('>H', b''.join(prefixed))
1250301
public function coreComponents(): array
    {
        return [
            'account' => [
                'class' => Account::class,
                'podiumBridge' => true,
            ],
            'category' => ['class' => Category::class],
            'forum' => ['class' => Forum::class],
            'group' => ['class' => Group::class],
            'member' => ['class' => Member::class],
            'message' => ['class' => Message::class],
            'poll' => ['class' => Poll::class],
            'post' => ['class' => Post::class],
            'rank' => ['class' => Rank::class],
            'thread' => ['class' => Thread::class],
        ];
    }
1221303
public List<Integer> getComponents (ComponentClass cclass)
    {
        List<Integer> list = _components.get(cclass);
        if (list == null) {
            list = Lists.newArrayList();
        }
        return list;
    }
1373526
def find_biconnected_components_as_subgraphs(graph):
    """"""
    list_of_graphs = []

    list_of_components = find_biconnected_components(graph)
    for edge_list in list_of_components:
        subgraph = get_subgraph_from_edge_list(graph, edge_list)
        list_of_graphs.append(subgraph)

    return list_of_graphs
344656
protected function getAllSubtypes($type)
    {
        $subTypes = [];

        foreach ($this->superTypeConfiguration as $nodeType => $superTypes) {
            if (in_array($type, $superTypes)) {
                if (isset($this->types[$nodeType])) {
                    $subTypes[] = $nodeType;

                    $nodeTypeSubTypes = $this->getAllSubtypes($nodeType);
                    foreach ($nodeTypeSubTypes as $nodeTypeSubType) {
                        if (!in_array($nodeTypeSubType, $subTypes)) {
                            $subTypes[] = $nodeTypeSubType;
                        }
                    }
                }
            }
        }

        return $subTypes;
    }
781158
def get_components_for_species( alignment, species ):
    """"""
    # If the number of components in the alignment is less that the requested number
    # of species we can immediately fail
    if len( alignment.components ) < len( species ): return None
    # Otherwise, build an index of components by species, then lookup 
    index = dict( [ ( c.src.split( '.' )[0], c ) for c in alignment.components ] )
    try: return [ index[s] for s in species ]
    except: return None
1272505
def types(cls, **kwargs):
    """"""
    named = {name: factory(Arguments._fields.index(name), name)
             for name, factory in six.iteritems(kwargs)}
    return cls(**named)
503249
def components(self):
        
        from pandas import DataFrame

        columns = ['days', 'hours', 'minutes', 'seconds',
                   'milliseconds', 'microseconds', 'nanoseconds']
        hasnans = self._hasnans
        if hasnans:
            def f(x):
                if isna(x):
                    return [np.nan] * len(columns)
                return x.components
        else:
            def f(x):
                return x.components

        result = DataFrame([f(x) for x in self], columns=columns)
        if not hasnans:
            result = result.astype('int64')
        return result
380142
def build_components(components):
    
    component_list = []

    for comp in components:
        component = ea.Component()

        # id
        component.id = comp.get('id')

        # type
        component.type = comp.get('type')

        # asset, if available
        component.asset = comp.get('asset')

        # DOI
        component.doi = comp.get('doi')

        if component_title(comp) != '':
            component.title = component_title(comp)

        # Subtitle
        if comp.get('type') in ['supplementary-material', 'fig']:

            if comp.get('full_caption'):
                subtitle = comp.get('full_caption')
                subtitle = clean_abstract(subtitle)
                component.subtitle = subtitle

        # Mime type
        if comp.get('type') in ['abstract', 'table-wrap', 'sub-article',
                                'chem-struct-wrap', 'boxed-text']:
            component.mime_type = 'text/plain'
        if comp.get('type') in ['fig']:
            component.mime_type = 'image/tiff'
        elif comp.get('type') in ['media', 'supplementary-material']:
            if comp.get('mimetype') and comp.get('mime-subtype'):
                component.mime_type = (comp.get('mimetype') + '/'
                                       + comp.get('mime-subtype'))

        # Permissions
        component.permissions = comp.get('permissions')

        # Append it to our list of components
        component_list.append(component)

    return component_list
736253
public int[] getSparseIndices(int component) {
    assert (sparse[component]);
    int[] indices = new int[pointers[component].length / 2];
    for (int i = 0; i < pointers[component].length / 2; i++) {
      indices[i] = (int) pointers[component][i * 2];
    }
    return indices;
  }
1120977
function getPropsType(component) {
  var propTypes = component.propTypes;
  var props = {};
  Object.keys(propTypes).forEach(function (k) {
    if (k !== '__strict__' && k !== '__subtype__') {
      props[k] = propTypes[k].tcomb;
    }
  });
  if (propTypes.hasOwnProperty('__subtype__')) {
    return t.refinement(t.struct(props), propTypes.__subtype__.predicate);
  }
  return t.struct(props);
}
643521
private Collection<TypeElement> subclasses(TypeElement te) {
        Collection<TypeElement> ret = classToSubclass.get(te);
        if (ret == null) {
            ret = new TreeSet<>(utils.makeClassUseComparator());
            Set<TypeElement> subs = classtree.subClasses(te);
            if (subs != null) {
                ret.addAll(subs);
                for (TypeElement sub : subs) {
                    ret.addAll(subclasses(sub));
                }
            }
            addAll(classToSubclass, te, ret);
        }
        return ret;
    }
1009040
public function getComponentsByType($type)
    {
        $components = new ArrayList();
        foreach ($this->components as $component) {
            if ($component instanceof $type) {
                $components->push($component);
            }
        }
        return $components;
    }
543152
def component_type(cls_or_slf, node):
        ""
        if node is None: return ''
        return cls_or_slf.type_formatter.format(type=str(type(node).__name__))
1138457
public function getComponents () : array
    {
        if (null === $this->components)
        {
            $this->components = $this->loader->loadComponents($this);
        }

        return $this->components;
    }
1026210
protected function getComponents()
    {
        if ($this->_components === null) {
            if ($this->_string === null) {
                return [];
            }
            $this->_components = $this->parseUri($this->_string);
        }
        return $this->_components;
    }