code: def get_reactor_tarball_path(self, tmpdir):
          
          if self.reactor_tarball_path:
              if not os.path.isfile(self.reactor_tarball_path):
                  logger.error("atomic-reactor sdist tarball does not exist: '%s'",
                               self.reactor_tarball_path)
                  raise RuntimeError("File does not exist: '%s'" % self.reactor_tarball_path)
              return self.reactor_tarball_path
          elif self.reactor_local_path:
              if not os.path.isdir(self.reactor_local_path):
                  logger.error("local atomic-reactor git clone does not exist: '%s'",
                               self.reactor_local_path)
                  raise RuntimeError("Local atomic-reactor git repo does not exist: '%s'" %
                                     self.reactor_local_path)
              local_reactor_git_path = self.reactor_local_path
          else:
              if self.use_official_reactor_git:
                  self.reactor_remote_path = REACTOR_GIT_URL
  
              g = LazyGit(self.reactor_remote_path, tmpdir=tmpdir)
              local_reactor_git_path = g.git_path
  
          cwd = os.getcwd()
          os.chdir(local_reactor_git_path)
          try:
              logger.debug("executing sdist command in directory '%s'", os.getcwd())
              subprocess.check_call(["python", "setup.py", "sdist", "--dist-dir", tmpdir])
          finally:
              os.chdir(cwd)
          candidates_list = glob(os.path.join(tmpdir, 'atomic-reactor-*.tar.gz'))
          if len(candidates_list) == 1:
              return candidates_list[0]
          else:
              logger.warning("len(atomic-reactor-*.tar.gz) != 1: '%s'", candidates_list)
              try:
                  return candidates_list[0]
              except IndexError:
                  raise RuntimeError("No atomic-reactor tarball built.")
docs: generate atomic-reactor tarball
          :return: