Get creator function by name.

    Args:
        name (str): name of the creator function.

    Returns:
        function: creater function.
349483
def get_creator_by_name(name):
    
    return {'docker(container)': Container.creator,
            'shell': Bash.creator, 'docker(image)': Image.creator,
            'python': Script.creator, 'packer': Packer.creator,
            'ansible(simple)': Ansible.creator}[name]
528009
def getReferenceByName(self, name):
        
        if name not in self._referenceNameMap:
            raise exceptions.ReferenceNameNotFoundException(name)
        return self._referenceNameMap[name]
1235773
def get_method(self, name):
        
        # TODO could use a generator here
        prog = re.compile(name)
        l = []
        for i in self.get_classes():
            for j in i.get_methods():
                if prog.match(j.get_name()):
                    l.append(j)
        return l
426048
def _get_instance_path(self, name):
        ""
        fname = self.pattern.format(**{'name': name})
        logger.debug(f'path {self.create_path}: {self.create_path.exists()}')
        self._create_path_dir()
        return Path(self.create_path, fname)
123749
def to_creator(self):
        
        o = {}

        for prop in ('name', 'id'):
            if hasattr(self, prop):
                o[prop] = getattr(self, prop)

        try:
            if len(self.a) > 0:
                o['a'] = []
                for node in self._unparse_a_tags(self._a_tags):
                    o['a'].append(node)
        except AttributeError:
            pass
        return o
788983
def creator_to_person(creator):
    
    name = Name()
    if "creatorName" in creator:
        name = parse_name_string(creator["creatorName"])
    if "familyName" in creator:
        name.family = creator["familyName"]
    if "givenName" in creator:
        name.given = creator["givenName"]

    person = Person(name=name, tags=creator.get("affiliations"))
    return person
65232
def named(self, name):
        ''''''
        name = self.serialize(name)
        return self.get_by('name', name)
194337
def getParameter(self, name):
        
        return lock_and_call(
            lambda: Parameter(self._impl.getParameter(name)),
            self._lock
        )
549205
public CreatorProperty findPropertyValue(String name) {
        return properties().stream().filter(p->name.equals(p.getName())).findFirst().orElse(EMPTY);
    }
496400
def get_plugin(self, name):
        
        for plugin in self.plugins:
            if plugin.name == name:
                return plugin

        raise PluginDoesNotExistError("Plugin '{}' not found".format(name))
1281070
def most_seen_creators_by_works(work_kind=None, role_name=None, num=10):
    
    return Creator.objects.by_works(kind=work_kind, role_name=role_name)[:num]
477952
function (name) {
            var utility = utilities[name];

            if (utility) {
                if (!utility.instance) {
                    utility.instance = utility.creator(this);
                }

                return utility.instance;
            }

            return null;
        }
1300047
def getNamedItem(self, name: str) -> Optional[Attr]:
        
        return self._dict.get(name, None)
168312
def get_child_by_name(self, name):
        
        for c in self.child_nodes:
            if c.name == name:
                return c
        return None
8445
def get(self, name=None):
        """"""
        if name is None:
            return self.init_value
        elif not self.support_name:
            msg = "generator does not support get-by-name: function {!r}"
            raise TypeError(msg.format(self.function))
        try:
            value = self.generator.send(name)
        except StopIteration:
            msg = "generator didn't yield: function {!r}"
            raise RuntimeError(msg.format(self.function))
        return value
895242
def get_configurable_by_name(self, name):
        
        l = [c for c in self.configurables if c.name == name]
        if l:
            return l[0]
677225
def _get_serialize_func(self, name, spec):
        
        func = getattr(self, 'serialize_' + name, None)
        if func:
            # this factory has a special serializer function for this field
            return func
        func = getattr(spec.fields[name], 'serialize', None)
        if func:
            return func
        return lambda value, entity, request: value