code: def _clean_record(rec):
      
      if workflow.is_cwl_record(rec):
          def _clean_fields(d):
              if isinstance(d, dict):
                  if "fields" in d:
                      out = []
                      for f in d["fields"]:
                          f = utils.deepish_copy(f)
                          f.pop("secondaryFiles", None)
                          out.append(f)
                      d["fields"] = out
                      return d
                  else:
                      out = {}
                      for k, v in d.items():
                          out[k] = _clean_fields(v)
                      return out
              else:
                  return d
          return _clean_fields(rec)
      else:
          return rec
docs: Remove secondary files from record fields, which are currently not supported.
  
      To be removed later when secondaryFiles added to records.