def _to_player(accessing_obj):
 if utils.inherits_from(accessing_obj, 'evennia.objects.objects.DefaultObject'):
  accessing_obj = accessing_obj.player
 return accessing_obj

def _to_player ( accessing_obj ) : if utils . inherits_from ( accessing_obj , 'evennia.objects.objects.DefaultObject' ) : accessing_obj = accessing_obj . player return accessing_obj
helper function .