def METHOD_NAME(
    self,
    group: Group,
    actor: Union[Team, User, RpcUser],
    reason: int = GroupSubscriptionReason.unknown,
) -> Optional[bool]:
    from sentry.models import Team, User
    if isinstance(actor, RpcUser) or isinstance(actor, User):
        return self.subscribe(group, actor, reason)
    if isinstance(actor, Team):
        # subscribe the members of the team
        team_users_ids = list(actor.member_set.values_list("user_id", flat=True))
        return self.bulk_subscribe(group, team_users_ids, reason)
    raise NotImplementedError("Unknown actor type: %r" % type(actor))