code: def fake_index(in_bam, data):
      
      index_file = "%s.bai" % in_bam
      if not utils.file_exists(index_file):
          with file_transaction(data, index_file) as tx_out_file:
              with open(tx_out_file, "w") as out_handle:
                  out_handle.write("name sorted -- no index")
      return index_file
docs: Create a fake index file for namesorted BAMs. bais require by CWL for consistency.