def assign(self, who):
    if isinstance(who, str):
      if Team.exists(who):
        who = Team(who)
      elif Conversation.byName(who): #byName handles short usernames as well as full JIDs
        who = SupportAgent( Conversation.byName(who).buddy )
      else:
        raise ValueError("I don't know any teams or people named \"%s\"" % who)

    if not isinstance(who, (Team,SupportAgent)):
      raise TypeError("You can only assign issues to Teams or SupportAgents")

    self.assignedTo = who

    if isinstance(who, SupportAgent) and who.available:
      who.engage(self)
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/models/issue.py/Issue.assign/original