def same_pyname(expected, pyname):
 if ((expected is None) or (pyname is None)):
  return False
 if (expected == pyname):
  return True
 if ((type(expected) not in (pynames.ImportedModule, pynames.ImportedName)) and (type(pyname) not in (pynames.ImportedModule, pynames.ImportedName))):
  return False
 return ((expected.get_definition_location() == pyname.get_definition_location()) and (expected.get_object() == pyname.get_object()))

def same_pyname ( expected , pyname ) : if ( ( expected is None ) or ( pyname is None ) ) : return False if ( expected == pyname ) : return True if ( ( type ( expected ) not in ( pynames . ImportedModule , pynames . ImportedName ) ) and ( type ( pyname ) not in ( pynames . ImportedModule , pynames . ImportedName ) ) ) : return False return ( ( expected . get_definition_location ( ) == pyname . get_definition_location ( ) ) and ( expected . get_object ( ) == pyname . get_object ( ) ) )
check whether expected and pyname are the same .