code: def create_branch(self, new_branch, delete_empty=False):
          
          logger.info("Preparing to create branch {} from {}".format(new_branch, self.config.branch))
          try:
              # create new branch
              self.provider.create_branch(
                  base_branch=self.config.branch,
                  new_branch=new_branch,
                  repo=self.user_repo
              )
              logger.info("Created branch {} from {}".format(new_branch, self.config.branch))
              return True
          except BranchExistsError:
              logger.info("Branch {} exists.".format(new_branch))
              # if the branch exists, is empty and delete_empty is set, delete it and call
              # this function again
              if delete_empty:
                  if self.provider.is_empty_branch(self.user_repo, self.config.branch, new_branch,
                                                   self.config.branch_prefix):
                      self.provider.delete_branch(self.user_repo, new_branch,
                                                  self.config.branch_prefix)
                      logger.info("Branch {} was empty and has been deleted".format(new_branch))
                      return self.create_branch(new_branch, delete_empty=False)
                  logger.info("Branch {} is not empty".format(new_branch))
          return False
docs: Creates a new branch.
          :param new_branch: string name of the new branch
          :param delete_empty: bool -- delete the branch if it is empty
          :return: bool -- True if successfull