class_docstr: Internal - builds up text suitable for writing to a RECORD item, e.g.
  within a wheel.
class_docstr_tok: ["Internal","-","builds","up","text","suitable","for","writing","to","a","RECORD","item",",","e.g",".","within","a","wheel","."]
code: def add_content(self, content, to_):
      if isinstance(content, str):
          content = content.encode("utf8")
  
      # Specification for the line we write is supposed to be in
      # https://packaging.python.org/en/latest/specifications/binary-distribution-format
      # but it's not very clear.
      #
      h = hashlib.sha256(content)
      digest = h.digest()
      digest = base64.urlsafe_b64encode(digest)
      digest = digest.rstrip(b"=")
      digest = digest.decode("utf8")
  
      self.text += f"{to_},sha256={digest},{len(content)}\n"
      log2(f"Adding {to_}")
  
imports: import base64
  import glob
  import hashlib
  import inspect
  import io
  import os
  import platform
  import re
  import shutil
  import site
  import setuptools
  import subprocess
  import sys
  import sysconfig
  import tarfile
  import textwrap
  import time
  import zipfile
  import wdev
label_desc: Use image node_id 2 for calling the _Record obj's underlying member method code with example usage: obj.add_content(content, to_) without return types