def _symbol(s, matching_symbol=None):
 if isinstance(s, string_types):
  if (matching_symbol and (matching_symbol.name == s)):
   return matching_symbol
  return Symbol(s, real=True)
 elif isinstance(s, Symbol):
  return s
 else:
  raise ValueError('symbol must be string for symbol name or Symbol')

def _symbol ( s , matching_symbol = None ) : if isinstance ( s , string_types ) : if ( matching_symbol and ( matching_symbol . name == s ) ) : return matching_symbol return Symbol ( s , real = True ) elif isinstance ( s , Symbol ) : return s else : raise ValueError ( 'symbol must be string for symbol name or Symbol' )
return s if s is a symbol .