Perform lookup for series

        :param int series_id: series id of series
        :returns: instance of series
        :rtype: object
553001
def get_series_by_id(self, series_id):
        
        try:
            return self.api.get_series(series_id), None
        except exceptions.TVDBRequestException as err:
            LOG.exception('search for series %s failed', series_id)
            return None, _as_str(err)
805849
def get_clusters(self, variant_id):
        
        query = {'variant_id':variant_id}
        identities = self.db.identity.find(query)
        return identities
833533
def add_to_queue(self, series):
        
        result = self._android_api.add_to_queue(series_id=series.series_id)
        return result
628151
def lookup_subclass(cls, d):
        
        try:
            typeid = d["typeid"]
        except KeyError:
            raise FieldError("typeid not present in keys %s" % list(d))

        subclass = cls._subcls_lookup.get(typeid, None)
        if not subclass:
            raise FieldError("'%s' not a valid typeid" % typeid)
        else:
            return subclass
868968
def get(self, run_id):
        
        id = self._parse_id(run_id)

        run = self.generic_dao.find_record(self.collection_name,
                                           {"_id": id})
        if run is None:
            raise NotFoundError("Run %s not found." % run_id)
        return run
105015
def unit_id(self, unit_id=None):
        
        if unit_id is None:
            return self.__unit_id
        if 0 <= int(unit_id) < 256:
            self.__unit_id = int(unit_id)
            return self.__unit_id
        else:
            return None
573434
def each_updated_series(options={}, &block)
      updates = options[:since] ? find_updates_since(options[:since]) : find_static_updates(options[:period])
      updates[:series].each do |series_id|
        series = self.find_series_by_id(series_id)
        block.call(series) if series && series.title
      end if updates[:series].respond_to?(:each)
    end
828224
def find(self, id, columns=None):
        
        if columns is None:
            columns = ["*"]

        if isinstance(id, list):
            return self.find_many(id, columns)

        self._query.where(self._model.get_qualified_key_name(), "=", id)

        return self.first(columns)
718943
def _access_through_series(values, name):
    
    values_as_series = pd.Series(values.ravel())
    if name == "season":
        months = values_as_series.dt.month.values
        field_values = _season_from_months(months)
    else:
        field_values = getattr(values_as_series.dt, name).values
    return field_values.reshape(values.shape)
1224143
public FTSeries getTvArtwork(String id) throws FanartTvException {
        URL url = ftapi.getImageUrl(BaseType.TV, id);
        String page = requestWebPage(url);

        FTSeries series = null;

        try {
            series = mapper.readValue(page, FTSeries.class);
        } catch (IOException ex) {
            throw new FanartTvException(ApiExceptionType.MAPPING_FAILED, "Failed to get data for ID " + id, url, ex);
        }

        if (series.isError()) {
            throw new FanartTvException(ApiExceptionType.ID_NOT_FOUND, series.getErrorMessage());
        }

        return series;
    }
1343971
def to_pandas_series_rdd(self):
        
        pd_index = self.index().to_pandas_index()
        return self.map(lambda x: (x[0], pd.Series(x[1], pd_index)))
1113490
def get(self, key):
        
        try:
            return self[self.id_lookup.get(key)]

        except TypeError:
            raise KeyError
1296428
async def series(self):
    '''
    '''
    items = []
    for i in await self.items:
      if i.type == 'Series':
        items.append(i)
      elif hasattr(i, 'series'):
        items.extend(await i.series)
    return items
431687
def get_series_episodes(self, id, page=1):
        """"""
        # perform the request
        params = {'page': page}
        r = self.session.get(self.base_url + '/series/{}/episodes'.format(id), params=params)
        if r.status_code == 404:
            return None
        r.raise_for_status()

        return r.json()
47003
def get_series(self, *args, **kwargs):
        
        from .series import Series, SeriesDataWrapper
        return self.get_related_resource(Series, SeriesDataWrapper, args, kwargs)
184544
def _validate_series_dtype(self, series: pd.Series) -> pd.Series:
        """"""
        return series.apply(lambda i: isinstance(i, self.dtype))
956981
def find_series_by_id(series_id, options={})
      series_url = "/series/#{series_id}"
      series_url << "/all" if options[:all]
      series_url << "/#{self.language}.xml"
      result = self.get_with_key(series_url)['Data']
      return nil unless result && result['Series']
      return result if options[:all]
      return result["Series"] if options[:raw]
      Series.new(self, result["Series"])
    end