docs: def to_pycode(self):
          """Create a python code object from the more abstract
          codetransfomer.Code object.
  
          Returns
          -------
          co : CodeType
              The python code object.
          """
          consts = self.consts
          names = self.names
          varnames = self.varnames
          freevars = self.freevars
          cellvars = self.cellvars
          bc = bytearray()
          for instr in self.instrs:
              bc.append(instr.opcode)  # Write the opcode byte.
              if isinstance(instr, LOAD_CONST):
                  # Resolve the constant index.
                  bc.extend(consts.index(instr.arg).to_bytes(argsize, 'little'))
              elif instr.uses_name:
                  # Resolve the name index.
                  bc.extend(names.index(instr.arg).to_bytes(argsize, 'little'))
              elif instr.uses_varname:
                  # Resolve the local variable index.
                  bc.extend(
                      varnames.index(instr.arg).to_bytes(argsize, 'little'),
                  )
              elif instr.uses_free:
                  # uses_free is really "uses freevars **or** cellvars".
                  try:
                      # look for the name in cellvars
                      bc.extend(
                          cellvars.index(instr.arg).to_bytes(argsize, 'little'),
                      )
                  except ValueError:
                      # fall back to freevars, incrementing the length of
                      # cellvars.
                      bc.extend(
                          (freevars.index(instr.arg) + len(cellvars)).to_bytes(
                              argsize,
                              'little',
                          )
                      )
              elif instr.absjmp:
                  # Resolve the absolute jump target.
                  bc.extend(
                      self.bytecode_offset(instr.arg).to_bytes(
                          argsize,
                          'little',
                      ),
                  )
              elif instr.reljmp:
                  # Resolve the relative jump target.
                  # We do this by subtracting the curren't instructions's
                  # sparse index from the sparse index of the argument.
                  # We then subtract argsize - 1 to account for the bytes the
                  # current instruction takes up.
                  bytecode_offset = self.bytecode_offset
                  bc.extend((
                      bytecode_offset(instr.arg) -
                      bytecode_offset(instr) -
                      argsize -
                      1
                  ).to_bytes(argsize, 'little',))
              elif instr.have_arg:
                  # Write any other arg here.
                  bc.extend(instr.arg.to_bytes(argsize, 'little'))
              elif WORDCODE:
                  # with wordcode, all instructions are padded to 2 bytes
                  bc.append(0)
  
          return CodeType(
              self.argcount,
              self.kwonlyargcount,
              len(varnames),
              self.stacksize,
              self.py_flags,
              bytes(bc),
              consts,
              names,
              varnames,
              self.filename,
              self.name,
              self.firstlineno,
              self.py_lnotab,
              freevars,
              cellvars,
          )