code: def read_iiasa(name, meta=False, **kwargs):
      
      conn = Connection(name)
      # data
      df = conn.query(**kwargs)
      df = IamDataFrame(df)
      # metadata
      if meta:
          mdf = conn.metadata()
          # only data for models/scenarios in df
          mdf = mdf[mdf.model.isin(df['model'].unique()) &
                    mdf.scenario.isin(df['scenario'].unique())]
          # get subset of data if meta is a list
          if islistable(meta):
              mdf = mdf[['model', 'scenario'] + meta]
          mdf = mdf.set_index(['model', 'scenario'])
          # we have to loop here because `set_meta()` can only take series
          for col in mdf:
              df.set_meta(mdf[col])
      return df
docs: Query an IIASA database. See Connection.query() for more documentation
  
      Parameters
      ----------
      name : str
          A valid IIASA database name, see pyam.iiasa.valid_connection_names()
      meta : bool or list of strings
          If not False, also include metadata indicators (or subset if provided).
      kwargs :
          Arguments for pyam.iiasa.Connection.query()