code: def transform(self, node, results):
      assert results
  
      base = results.get("base")
      attr = results.get("attr")
      name = results.get("name")
  
      if base:
          if self.shadowed_next:
              attr.replace(Name("__next__", prefix=attr.prefix))
          else:
              base = [n.clone() for n in base]
              base[0].prefix = ""
              node.replace(Call(Name("next", prefix=node.prefix), base))
      elif name:
          n = Name("__next__", prefix=name.prefix)
          name.replace(n)
      elif attr:
          # We don't do this transformation if we're assigning to "x.next".
          # Unfortunately, it doesn't seem possible to do this in PATTERN,
          #  so it's being done here.
          if is_assign_target(node):
              head = results["head"]
              if (
                  "".join([str(n) for n in head]).strip()
                  == "__builtin__"
              ):
                  self.warning(node, bind_warning)
              return
          attr.replace(Name("__next__"))
      elif "global" in results:
          self.warning(node, bind_warning)
          self.shadowed_next = True
  
file_path: catboost/contrib/tools/python/src/Lib/lib2to3/fixes/fix_next.py
imports: from ..pgen2 import token
  from ..pygram import python_symbols
  from ..None import fixer_base
  from ..fixer_util import Name, Call, find_binding
label_desc: Use image node_id 2 for calling the FixNext obj's underlying member method code with example usage: obj.transform(node, results) without return types