code: def get_series(self, series_id, observation_start=None, observation_end=None, **kwargs):
          
          url = "%s/series/observations?series_id=%s" % (self.root_url, series_id)
          if observation_start is not None:
              observation_start = pd.to_datetime(observation_start,
                                                 errors='raise')
              url += '&observation_start=' + observation_start.strftime('%Y-%m-%d')
          if observation_end is not None:
              observation_end = pd.to_datetime(observation_end, errors='raise')
              url += '&observation_end=' + observation_end.strftime('%Y-%m-%d')
          if kwargs.keys():
              url += '&' + urlencode(kwargs)
          root = self.__fetch_data(url)
          if root is None:
              raise ValueError('No data exists for series id: ' + series_id)
          data = {}
          for child in root.getchildren():
              val = child.get('value')
              if val == self.nan_char:
                  val = float('NaN')
              else:
                  val = float(val)
              data[self._parse(child.get('date'))] = val
          return pd.Series(data)
docs: Get data for a Fred series id. This fetches the latest known data, and is equivalent to get_series_latest_release()
  
          Parameters
          ----------
          series_id : str
              Fred series id such as 'CPIAUCSL'
          observation_start : datetime or datetime-like str such as '7/1/2014', optional
              earliest observation date
          observation_end : datetime or datetime-like str such as '7/1/2014', optional
              latest observation date
          kwargs : additional parameters
              Any additional parameters supported by FRED. You can see https://api.stlouisfed.org/docs/fred/series_observations.html for the full list
  
          Returns
          -------
          data : Series
              a Series where each index is the observation date and the value is the data for the Fred series