<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def commit_file(self, message, path, content):
 """ Add a new file as blob in the storage, add its tree entry into the index and commit the index. :param message: str :param path: str :param content: str :return: """

        if self.git_batch_commit:
            self.add_file(path, content)
            self.git_batch_commit_messages.append(message)
        else:
            with self.lock_write():
                if self.job_id:
                    self.read_tree(self.ref_head)

                self.add_file(path, content)

                return self.commit_index(message)