code: def upload(
          cls, files, metadata=None, tags=None, project=None, coerce_ascii=False, progressbar=None
      ):
          
          res = cls._resource
          if not isinstance(files, string_types) and not isinstance(files, tuple):
              raise OneCodexException(
                  "Please pass a string or tuple or forward and reverse filepaths."
              )
  
          if not isinstance(project, Projects) and project is not None:
              project_search = Projects.get(project)
              if not project_search:
                  project_search = Projects.where(name=project)
              if not project_search:
                  try:
                      project_search = Projects.where(project_name=project)
                  except HTTPError:
                      project_search = None
              if not project_search:
                  raise OneCodexException("{} is not a valid project UUID".format(project))
  
              if isinstance(project_search, list):
                  project = project_search[0]
  
          sample_id = upload_sequence(
              files,
              res._client.session,
              res,
              metadata=metadata,
              tags=tags,
              project=project,
              coerce_ascii=coerce_ascii,
              progressbar=progressbar,
          )
  
          return cls.get(sample_id)
docs: Uploads a series of files to the One Codex server.
  
          Parameters
          ----------
          files : `string` or `tuple`
              A single path to a file on the system, or a tuple containing a pairs of paths. Tuple
              values  will be interleaved as paired-end reads and both files should contain the same
              number of records. Paths to single files will be uploaded as-is.
          metadata : `dict`, optional
          tags : `list`, optional
          project : `string`, optional
              UUID of project to associate this sample with.
          coerce_ascii : `bool`, optional
              If true, rename unicode filenames to ASCII and issue warning.
          progressbar : `click.progressbar`, optional
              If passed, display a progress bar using Click.
  
          Returns
          -------
          A `Samples` object upon successful upload. None if the upload failed.