code: def clean_files(files):
      
      if isinstance(files, (list, tuple)):
          for f in files:
              yield clean_file(f)
      else:
          yield clean_file(files)
docs: Generates tuples with a ``file``-like object and a close indicator.
  
      This is a generator of tuples, where the first element is the file object
      and the second element is a boolean which is True if this module opened the
      file (and thus should close it).
  
      Raises
      ------
      OSError : Accessing the given file path failed
  
      Parameters
      ----------
      files : list | io.IOBase | str
          Collection or single instance of a filepath and file-like object