code: def select_nodeids(xmrs, iv=None, label=None, pred=None):
      
      def datamatch(nid):
          ep = xmrs.ep(nid)
          return ((iv is None or ep.iv == iv) and
                  (pred is None or ep.pred == pred) and
                  (label is None or ep.label == label))
      return list(filter(datamatch, xmrs.nodeids()))
docs: Return the list of matching nodeids in *xmrs*.
  
      Nodeids in *xmrs* match if their corresponding
      :class:`~delphin.mrs.components.ElementaryPredication` object
      matches its `intrinsic_variable` to *iv*, `label` to *label*,
      and `pred` to *pred*. The *iv*, *label*, and *pred* filters are
      ignored if they are `None`.
  
      Args:
          xmrs (:class:`~delphin.mrs.xmrs.Xmrs`): semantic structure to
              query
          iv (str, optional): intrinsic variable to match
          label (str, optional): label to match
          pred (str, :class:`~delphin.mrs.components.Pred`, optional):
              predicate to match
      Returns:
          list: matching nodeids