def hashvalue(arg):
 if isinstance(arg, XBlock):
  return unicode(arg.location)
 else:
  return unicode(arg)

def hashvalue ( arg ) : if isinstance ( arg , XBlock ) : return unicode ( arg . location ) else : return unicode ( arg )
if arg is an xblock .