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","."]
code: def _is_stdlib_datetime(
      self,
      function_name: str,
      module_name: str,
      fmt: str,
      attribute_count: int,
  ) -> bool:
      if not self._caller_variables:
          self._caller_variables.update(_get_all_caller_variables())
      vars = self._caller_variables
      return (
          attribute_count == 0
          and vars.get(function_name) is datetime.datetime
      ) or (attribute_count == 1 and vars.get(module_name) is datetime)
  
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 11 for calling the RewrittenInstructions obj's underlying member method code with example usage: obj._is_stdlib_datetime(function_name, module_name, fmt, attribute_count) and returns: unknown