class_docstr: Standalone class that applies Instruction rewrite/filtering rules.
  
  This significantly simplifies subsequent parsing by injecting
  synthetic POLARS_EXPRESSION ops into the Instruction stream for
  easy identification/translation and separates the parsing logic
  from the identification of expression translation opportunities.
class_docstr_tok: ["Standalone","class","that","applies","Instruction","rewrite\/filtering","rules",".","This","significantly","simplifies","subsequent","parsing","by","injecting","synthetic","POLARS_EXPRESSION","ops","into","the","Instruction","stream","for","easy","identification\/translation","and","separates","the","parsing","logic","from","the","identification","of","expression","translation","opportunities","."]
docstr: Rewrite any older binary opcodes using py 3.11 'BINARY_OP' instead.
code: def _upgrade_instruction(inst: Instruction) -> Instruction:
      """Rewrite any older binary opcodes using py 3.11 'BINARY_OP' instead."""
      if not _MIN_PY311 and inst.opname in OpNames.BINARY:
          inst = inst._replace(
              argrepr=OpNames.BINARY[inst.opname],
              opname="BINARY_OP",
          )
      return inst
  
imports: from __future__ import annotations
  import datetime
  import dis
  import inspect
  import re
  import sys
  import warnings
  from bisect import bisect_left
  from collections import defaultdict
  from dis import get_instructions
  from inspect import signature
  from itertools import count, zip_longest
  from pathlib import Path
  from typing import TYPE_CHECKING, AbstractSet, Any, Callable, ClassVar, Iterator, Literal, NamedTuple, Union
label_desc: Use image node_id 10 for calling the RewrittenInstructions obj's underlying member method code with example usage: obj._upgrade_instruction(inst) and returns: inst