code: def select_hcons(xmrs, hi=None, relation=None, lo=None):
      
      hcmatch = lambda hc: (
          (hi is None or hc.hi == hi) and
          (relation is None or hc.relation == relation) and
          (lo is None or hc.lo == lo))
      return list(filter(hcmatch, xmrs.hcons()))
docs: Return the list of matching HCONS for *xmrs*.
  
      :class:`~delphin.mrs.components.HandleConstraint` objects for
      *xmrs* match if their `hi` matches *hi*, `relation` matches
      *relation*, and `lo` matches *lo*. The *hi*, *relation*, and *lo*
      filters are ignored if they are `None`.
  
      Args:
          xmrs (:class:`~delphin.mrs.xmrs.Xmrs`): semantic structure to
              query
          hi (str, optional): hi handle (hole) to match
          relation (str, optional): handle constraint relation to match
          lo (str, optional): lo handle (label) to match
      Returns:
          list: matching HCONS