def METHOD_NAME(self, pms_property_id, default_code=None):
    """
    :param pms_property_id: property ID
    :param default_code: board service code (optional)
    :return: - recordset of
                - all the pms.board.service of the pms_property_id
                  if default_code not defined
                - one or 0 pms.board.service if default_code defined
             - ValidationError if more than one default_code found by
               the same pms_property_id
    """
    # TODO: similiar code as room.type -> unify
    domain = []
    if default_code:
        domain += ["&", ("default_code", "=", default_code)]
    domain += [
        "|",
        ("pms_property_ids", "in", pms_property_id),
        ("pms_property_ids", "=", False),
    ]
    records = self.search(domain)
    res, res_priority = {}, {}
    for rec in records:
        res_priority.setdefault(rec.default_code, -1)
        priority = rec.pms_property_ids and 1 or 0
        if priority > res_priority[rec.default_code]:
            res.setdefault(rec.default_code, rec.id)
            res[rec.default_code], res_priority[rec.default_code] = rec.id, priority
        elif priority == res_priority[rec.default_code]:
            raise ValidationError(
                _(
                    "Integrity error: There's multiple board services "
                    "with the same code %s and properties"
                )
                % rec.default_code
            )
    return self.browse(list(res.values()))