def lockShared(principal_ids=None, duration=None):
    """lock context with a shared lock, and return token.

        if principal_ids is None, use interaction's principals; if interaction
        does not have any principals, raise ValueError.

        if principal_ids is not None, principal_ids must be in interaction,
        or else raise ParticipationError.  Must be at least one id.

        Same constraints as token utility's register method.
        """
