code: def metadata(self, default=True):
          
          # at present this reads in all data for all scenarios, it could be sped
          # up in the future to try to query a subset
          default = 'true' if default else 'false'
          add_url = 'runs?getOnlyDefaultRuns={}&includeMetadata=true'
          url = self.base_url + add_url.format(default)
          headers = {'Authorization': 'Bearer {}'.format(self.auth())}
          r = requests.get(url, headers=headers)
          df = pd.read_json(r.content, orient='records')
  
          def extract(row):
              return (
                  pd.concat([row[['model', 'scenario']],
                             pd.Series(row.metadata)])
                  .to_frame()
                  .T
                  .set_index(['model', 'scenario'])
              )
  
          return pd.concat([extract(row) for idx, row in df.iterrows()],
                           sort=False).reset_index()
docs: Metadata of scenarios in the connected data source
  
          Parameter
          ---------
          default : bool, optional, default True
              Return *only* the default version of each Scenario.
              Any (`model`, `scenario`) without a default version is omitted.
              If :obj:`False`, return all versions.