code: def set_length_and_maybe_checksums(self, record, payload_offset=None):
          '''Set the content length and possibly the checksums.'''
          if self._params.digests:
              record.compute_checksum(payload_offset)
          else:
              record.set_content_length(f set_length_and_maybe_checksums(self, record, payload_offset=None):
          '''Set the content length and possibly the checksums.'''
          if self._params.digests:
              record.compute_checksum(payload_offset)
          else:
              record.set_content_length()
docs: Set the content length and possibly the checksums.