code: def get_record_list(db_dir, records='all'):
      
      # Full url physiobank database
      db_url = posixpath.join(config.db_index_url, db_dir)
  
      # Check for a RECORDS file
      if records == 'all':
          response = requests.get(posixpath.join(db_url, 'RECORDS'))
          if response.status_code == 404:
              raise ValueError('The database %s has no WFDB files to download' % db_url)
  
          # Get each line as a string
          record_list = response.content.decode('ascii').splitlines()
      # Otherwise the records are input manually
      else:
          record_list = records
  
      return record_list
docs: Get a list of records belonging to a database.
  
      Parameters
      ----------
      db_dir : str
          The database directory, usually the same as the database slug.
          The location to look for a RECORDS file.
      records : list, optional
          A Option used when this function acts as a helper function.
          Leave as default 'all' to get all records.
  
      Examples
      --------
      >>> wfdb.get_record_list('mitdb')