code: def disambiguate(*iter):
      """
      Return a Tuple containing the passed expressions with symbols
      that appear the same when printed replaced with numerically
      subscripted symbols, and all Dummy symbols replaced with Symbols.
  
      Parameters
      ==========
  
      iter: list of symbols or expressions.
  
      Examples
      ========
  
      >>> from sympy.core.symbol import disambiguate
      >>> from sympy import Dummy, Symbol, Tuple
      >>> from sympy.abc import y
  
      >>> tup = Symbol('_x'), Dummy('x'), Dummy('x')
      >>> disambiguate(*tup)
      (x_2, x, x_1)
  
      >>> eqs = Tuple(Symbol('x')/y, Dummy('x')/y)
      >>> disambiguate(*eqs)
      (x_1/y, x/y)
  
      >>> ix = Symbol('x', integer=True)
      >>> vx = Symbol('x')
      >>> disambiguate(vx + ix)
      (x + x_1,)
  
      To make your own mapping of symbols to use, pass only the free symbols
      of the expressions and create a dictionary:
  
      >>> free = eqs.free_symbols
      >>> mapping = dict(zip(free, disambiguate(*free)))
      >>> eqs.xreplace(mapping)
      (x_1/y, x/y)
  
      """
      new_iter = Tuple(*iter)
      key = lambda x: tuple(sorted(x.assumptions0.items()))
      syms = ordered(new_iter.free_symbols, keys=key)
      mapping = {}
      for s in syms:
          mapping.setdefault(str(s).lstrip("_"), []).append(s)
      reps = {}
      for k in mapping:
          # the first or only symbol doesn't get subscripted but make
          # sure that it's a Symbol, not a Dummy
          mapk0 = Symbol("%s" % (k), **mapping[k][0].assumptions0)
          if mapping[k][0] != mapk0:
              reps[mapping[k][0]] = mapk0
          # the others get subscripts (and are made into Symbols)
          skip = 0
          for i in range(1, len(mapping[k])):
              while True:
                  name = "%s_%i" % (k, i + skip)
                  if name not in mapping:
                      break
                  skip += 1
              ki = mapping[k][i]
              reps[ki] = Symbol(name, **ki.assumptions0)
      return new_iter.xreplace(reps)
  
imports: from __future__ import annotations
  from .assumptions import StdFactKB, _assume_defined
  from .basic import Basic, Atom
  from .cache import cacheit
  from .containers import Tuple
  from .expr import Expr, AtomicExpr
  from .function import AppliedUndef, FunctionClass
  from .kind import NumberKind, UndefinedKind
  from .logic import fuzzy_bool
  from .singleton import S
  from .sorting import ordered
  from .sympify import sympify
  from sympy.logic.boolalg import Boolean
  from sympy.utilities.iterables import sift, is_sequence
  from sympy.utilities.misc import filldedent
  import string
  import re
  import random
  from itertools import product
  from typing import Any
label_desc: Use image node_id 6 for calling a global function with example usage: disambiguate() and returns: new_iter