<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def in_labelset(xmrs, nodeids, label=None):
 """ Test if all nodeids share a label. Args: nodeids: iterable of nodeids label (str, optional):
 the label that all nodeids must share Returns: bool: `True` if all nodeids share a label, otherwise `False` """

    nodeids = set(nodeids)
    if label is None:
        label = xmrs.ep(next(iter(nodeids))).label
    return nodeids.issubset(xmrs._vars[label]['refs']['LBL'])