def _set_metric(self, v, load=False):
if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=RestrictedClassType(<EOL>base_type=RestrictedClassType(<EOL>base_type=int,<EOL>restriction_dict={"<STR_LIT>": ["<STR_LIT>"]},<EOL>int_size=<NUM_LIT:8>,<EOL>),<EOL>restriction_dict={"<STR_LIT>": ["<STR_LIT>"]},<EOL>),<EOL>is_leaf=True,<EOL>yang_name="<STR_LIT>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=False,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__metric = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>
Setter method for metric, mapped from YANG variable /network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/ipv4_internal_reachability/prefixes/prefixes/error_metric/state/metric (oc-isis-types:narrow-metric)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_metric is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_metric() directly.

    YANG Description: ISIS error metric value. This metric measures the residual error
probability of the associated circuit. It is an optional metric,
which if assigned to a circuit shall have a non-zero value. Higher
values indicate a larger probability of undetected errors on the
circuit.