def get_property(self, prop_name, **kwargs):
        ovr_default = False
        default = None
        if 'default' in kwargs:
            ovr_default = True
            default = kwargs.pop('default')
        if kwargs:
            raise TypeError("got an unexpected keyword argument '%s'" % list(kwargs.keys())[0])
        if prop_name in self.inst.properties:
            prop_value = self.inst.properties[prop_name]
            if isinstance(prop_value, rdltypes.ComponentRef):
                prop_value = prop_value.build_node_ref(self, self.env)
            if isinstance(prop_value, rdltypes.PropertyReference):
                prop_value._resolve_node(self)
            return prop_value
        if ovr_default:
            return default
        rule = self.env.property_rules.lookup_property(prop_name)
        if rule is None:
            raise LookupError("Unknown property '%s'" % prop_name)
        if type(self.inst) not in rule.bindable_to:
            raise LookupError("Unknown property '%s'" % prop_name)
        return rule.get_default(self)