code: def _sanity_check_files(item, files):
      
      msg = None
      file_types = set([("bam" if x.endswith(".bam") else "fastq") for x in files if x])
      if len(file_types) > 1:
          msg = "Found multiple file types (BAM and fastq)"
      file_type = file_types.pop()
      if file_type == "bam":
          if len(files) != 1:
              msg = "Expect a single BAM file input as input"
      elif file_type == "fastq":
          if len(files) not in [1, 2] and item["analysis"].lower() != "scrna-seq":
              pair_types = set([len(xs) for xs in fastq.combine_pairs(files)])
              if len(pair_types) != 1 or pair_types.pop() not in [1, 2]:
                  msg = "Expect either 1 (single end) or 2 (paired end) fastq inputs"
          if len(files) == 2 and files[0] == files[1]:
              msg = "Expect both fastq files to not be the same"
      if msg:
          raise ValueError("%s for %s: %s" % (msg, item.get("description", ""), files))
docs: Ensure input files correspond with supported approaches.
  
      Handles BAM, fastqs, plus split fastqs.