docstr: Format instruction details for inclusion in disassembly output.
docstr_tok: ["Format","instruction","details","for","inclusion","in","disassembly","output","."]
code: def print_instruction_line(self, instr, mark_as_current):
      """Format instruction details for inclusion in disassembly output."""
      lineno_width = self.lineno_width
      offset_width = self.offset_width
      label_width = self.label_width
  
      new_source_line = (
          lineno_width > 0 and instr.starts_line and instr.offset > 0
      )
      if new_source_line:
          print(file=self.file)
  
      fields = []
      # Column: Source code line number
      if lineno_width:
          if instr.starts_line:
              lineno_fmt = (
                  "%%%dd" if instr.line_number is not None else "%%%ds"
              )
              lineno_fmt = lineno_fmt % lineno_width
              lineno = (
                  _NO_LINENO
                  if instr.line_number is None
                  else instr.line_number
              )
              fields.append(lineno_fmt % lineno)
          else:
              fields.append(" " * lineno_width)
      # Column: Label
      if instr.label is not None:
          lbl = f"L{instr.label}:"
          fields.append(f"{lbl:>{label_width}}")
      else:
          fields.append(" " * label_width)
      # Column: Instruction offset from start of code sequence
      if offset_width > 0:
          fields.append(f"{repr(instr.offset):>{offset_width}}  ")
      # Column: Current instruction indicator
      if mark_as_current:
          fields.append("-->")
      else:
          fields.append("   ")
      # Column: Opcode name
      fields.append(instr.opname.ljust(_OPNAME_WIDTH))
      # Column: Opcode argument
      if instr.arg is not None:
          arg = repr(instr.arg)
          # If opname is longer than _OPNAME_WIDTH, we allow it to overflow into
          # the space reserved for oparg. This results in fewer misaligned opargs
          # in the disassembly output.
          opname_excess = max(0, len(instr.opname) - _OPNAME_WIDTH)
          fields.append(
              repr(instr.arg).rjust(_OPARG_WIDTH - opname_excess)
          )
          # Column: Opcode argument details
          if instr.argrepr:
              fields.append("(" + instr.argrepr + ")")
      print(" ".join(fields).rstrip(), file=self.file)
  
imports: import sys
  import types
  import collections
  import io
  from opcode import *
  from opcode import __all__, _cache_format, _inline_cache_entries, _nb_ops, _intrinsic_1_descs, _intrinsic_2_descs, _specializations, _specialized_opmap
label_desc: Use image node_id 3 for calling the Formatter obj's underlying member method code with example usage: obj.print_instruction_line(instr, mark_as_current) without return types