API for Party / Squad members enumeration and handling?

How would I set team_attitude? fort_team_collection only seems to have getters for attitude, not setters. Is there some extension method somewhere that I haven’t found?