code: def unpack_reg_val_pair(classical_reg1, classical_reg2):
      
      left = unpack_classical_reg(classical_reg1)
      if isinstance(classical_reg2, int) or isinstance(classical_reg2, float):
          right = classical_reg2
      else:
          right = unpack_classical_reg(classical_reg2)
  
      return left, right
docs: Helper function for typechecking / type-coercing arguments to constructors for binary classical operators.
  
      :param classical_reg1: Specifier for the classical memory address to be modified.
      :param classical_reg2: Specifier for the second argument: a classical memory address or an immediate value.
      :return: A pair of pyQuil objects suitable for use as operands.