Returns the :class:`~plexapi.myplex.MyPlexDevice` that matches the name specified.

            Parameters:
                name (str): Name to match against.
547027
def device(self, name):
        
        for device in self.devices():
            if device.name.lower() == name.lower():
                return device
        raise NotFound('Unable to find device %s' % name)
438151
def get_parameter(self, name):
        
        for parameter in self._parameters:
            if parameter.name == name:
                return parameter
175659
def with_name(self, name):
        """"""
        if not self.name:
            raise ValueError("%r has an empty name" % (self,))
        return self._from_parsed_parts(self._drv, self._root,
                                       self._parts[:-1] + [name])
238681
def prefix(self, name):
        
        a_node = self.adapter.get_node_attribute_node(self.impl_element, name)
        if a_node is None:
            return None
        return a_node.prefix
622586
def name(self, name):
        
        self._data['name'] = name
        request = self._base_request
        request['name'] = name
        return self._tc_requests.update(request, owner=self.owner)
767475
def _name_helper(name: str):
    
    name = name.rstrip()
    if name.endswith(('.service', '.socket', '.target')):
        return name
    return name + '.service'
348868
def port(self, name):
        
        for p in self.ports:
            if p.name == name:
                return p
607397
def parse_name(cls, name: str, default: T = None) -> T:
        """"""
        if not name:
            return default
        name = name.lower()
        return next((item for item in cls if name == item.name.lower()), default)
1298875
def get(self, name: str):
        
        dep = None
        try:
            dep = self._registry[name]
        except KeyError:
            raise DependencyNotFoundError(name) from None
        value = self.cached(dep)
        if value is None:
            value = dep.factory()
            self.cache(dep, value)
        return value
1216907
def lookupByName(self, name):
        
        res = yield queue.executeInThread(self.connection.lookupByName, name)
        return self.DomainClass(self, res)
809849
def getBiosampleByName(self, name):
        
        if name not in self._biosampleNameMap:
            raise exceptions.BiosampleNameNotFoundException(name)
        return self._biosampleNameMap[name]
253950
def get_name(self, name):
        """"""
        if name not in self.get_names():
            raise exceptions.NameNotFoundError('name %s not found' % name)
        return self.get_names()[name]
1227123
def get_device_by_name(self, device_name):
        

        # Find the device for the vera device name we are interested in
        found_device = None
        for device in self.get_devices():
            if device.name == device_name:
              found_device = device
              # found the first (and should be only) one so we will finish
              break

        if found_device is None:
            logger.debug('Did not find device with {}'.format(device_name))

        return found_device
668398
def get_name_init(self, name):
        
        self._register_name(name)

        return self._var_name_mappers[name].get_init()
838168
def request_name(self, name):
        

        while name in self._blacklist:
            name += "_"
        self._blacklist.add(name)
        return name
509274
def find_device_by_name(name):
    """"""
    if not name:
        return DEFAULT_DEV
    with DEV_LOCK:
        for dev in DEVS:
            if dev.name == name:
                return dev
    return None
31876
def get_client(self, name):
        
        mech = self.get(name)
        return mech if isinstance(mech, ClientMechanism) else None