def sos_func(dm, team, context, **kwargs):
    """return the sos of this team in the given year"""
    sos = dm.data.sos
    team_id = team.team_id
    yr = context.season.yr

    this = sos[(sos.year == yr) & (sos.team_id == team_id)]

    if this.shape[0] == 0:
        return 0

    this_sos = this.sos.iloc[0]

    return this_sos