code: def convert(files, **kwargs):
      
  
      if len(files) < 1:
          raise ValueError("Files needs to be a non-empty list")
  
      if len(files) == 1:
          if os.path.isfile(files[0]):
              return files_to_pif(files, **kwargs)
          else:
              return directory_to_pif(files[0], **kwargs)
      else:
          return files_to_pif([x for x in files if os.path.isfile(x)], **kwargs)
docs: Wrap directory to pif as a dice extension
      :param files: a list of files, which must be non-empty
      :param kwargs: any additional keyword arguments
      :return: the created pif