code: def batch(self, table_name, timeout=None):
          '''
          Creates a batch object which can be used as a context manager. Commits the batch on exit.
  
          :param str table_name:
              The name of the table to commit the batch to.
          :param int timeout:
              The server timeout, expressed in seconds.
          '''
          batch = TableBatch(self.require_encryption, self.key_encryption_key, self.encryption_resolver_function)
          yield batch
          self.commit_batch(table_name, batch, timeout=timeoutf batch(self, table_name, timeout=None):
          '''
          Creates a batch object which can be used as a context manager. Commits the batch on exit.
  
          :param str table_name:
              The name of the table to commit the batch to.
          :param int timeout:
              The server timeout, expressed in seconds.
          '''
          batch = TableBatch(self.require_encryption, self.key_encryption_key, self.encryption_resolver_function)
          yield batch
          self.commit_batch(table_name, batch, timeout=timeout)
docs: Creates a batch object which can be used as a context manager. Commits the batch on exit.
  
          :param str table_name:
              The name of the table to commit the batch to.
          :param int timeout:
              The server timeout, expressed in seconds.