code: def convert(cls, record):
          
          if isinstance(record, list):
              return [cls._convert(r) for r in record]
          else:
              return [cls._convert(record)]
docs: Converts a single dictionary or list of dictionaries into converted list of dictionaries.