code: def RecurrenceOperators(base, generator):
      """
      Returns an Algebra of Recurrence Operators and the operator for
      shifting i.e. the `Sn` operator.
      The first argument needs to be the base polynomial ring for the algebra
      and the second argument must be a generator which can be either a
      noncommutative Symbol or a string.
  
      Examples
      ========
  
      >>> from sympy import ZZ
      >>> from sympy import symbols
      >>> from sympy.holonomic.recurrence import RecurrenceOperators
      >>> n = symbols('n', integer=True)
      >>> R, Sn = RecurrenceOperators(ZZ.old_poly_ring(n), 'Sn')
      """
  
      ring = RecurrenceOperatorAlgebra(base, generator)
      return (ring, ring.shift_operator)
  
imports: from sympy.core.singleton import S
  from sympy.core.symbol import Symbol, symbols
  from sympy.printing import sstr
  from sympy.core.sympify import sympify
label_desc: Use image node_id 1 for calling a global function with example usage: RecurrenceOperators(base, generator) and returns: ring,  ring