<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def put(self, f, digest=None):
 """ Upload a blob :param f: File object to be uploaded (required to support seek if digest is not provided). :param digest: Optional SHA-1 hex digest of the file contents. Gets computed before actual upload if not provided, which requires an extra file read. :return: The hex digest of the uploaded blob if not provided in the call. Otherwise a boolean indicating if the blob has been newly created. """


        if digest:
            actual_digest = digest
        else:
            actual_digest = self._compute_digest(f)

        created = self.conn.client.blob_put(self.container_name,
                                            actual_digest, f)
        if digest:
            return created
        return actual_digest