code: def to_team(team):
          
          from sevenbridges.models.team import Team
          if not team:
              raise SbgError('Team is required!')
          elif isinstance(team, Team):
              return team.id
          elif isinstance(team, six.string_types):
              return team
          else:
              raise SbgError('Invalid team parameter!')
docs: Serializes team to id string
          :param team: object to serialize
          :return: string id