code: def merge(bedfiles):
      
      if isinstance(bedfiles, list):
          catted = concat(bedfiles)
      else:
          catted = concat([bedfiles])
      if catted:
          return concat(bedfiles).sort().merge()
      else:
          return catted
docs: given a BED file or list of BED files merge them an return a bedtools object