code: def bdh(self, tickers, flds, start_date, end_date, elms=None,
              ovrds=None, longdata=False):
          
          ovrds = [] if not ovrds else ovrds
          elms = [] if not elms else elms
  
          elms = list(elms)
  
          data = self._bdh_list(tickers, flds, start_date, end_date,
                                elms, ovrds)
  
          df = pd.DataFrame(data, columns=['date', 'ticker', 'field', 'value'])
          df.loc[:, 'date'] = pd.to_datetime(df.loc[:, 'date'])
          if not longdata:
              cols = ['ticker', 'field']
              df = df.set_index(['date'] + cols).unstack(cols)
              df.columns = df.columns.droplevel(0)
  
          return df
docs: Get tickers and fields, return pandas DataFrame with columns as
          MultiIndex with levels "ticker" and "field" and indexed by "date".
          If long data is requested return DataFrame with columns
          ["date", "ticker", "field", "value"].
  
          Parameters
          ----------
          tickers: {list, string}
              String or list of strings corresponding to tickers
          flds: {list, string}
              String or list of strings corresponding to FLDS
          start_date: string
              String in format YYYYmmdd
          end_date: string
              String in format YYYYmmdd
          elms: list of tuples
              List of tuples where each tuple corresponds to the other elements
              to be set, e.g. [("periodicityAdjustment", "ACTUAL")].
              Refer to the HistoricalDataRequest section in the
              'Services & schemas reference guide' for more info on these values
          ovrds: list of tuples
              List of tuples where each tuple corresponds to the override
              field and value
          longdata: boolean
              Whether data should be returned in long data format or pivoted