def parse_state(self, device=None, profile=None, native=None, attrs=None):
if attrs is None:<EOL><INDENT>attrs = self.elements().values()<EOL><DEDENT>for v in attrs:<EOL><INDENT>parser = Parser(<EOL>v, device=device, profile=profile, native=native, is_config=False<EOL>)<EOL>parser.parse()<EOL><DEDENT>
Parse native state and load it into the corresponding models. Only models
that have been added to the root object will be parsed.

If ``native`` is passed to the method that's what we will parse, otherwise, we will use the
``device`` to retrieve it.

Args:
    device (NetworkDriver): Device to load the configuration from.
    profile (list): Profiles that the device supports. If no ``profile`` is passed it will
      be read from ``device``.
    native (list string): Native output to parse.

Examples:

    >>> # Load from device
    >>> state = napalm_yang.base.Root()
    >>> state.add_model(napalm_yang.models.openconfig_interfaces)
    >>> state.parse_config(device=d)

    >>> # Load from file
    >>> with open("junos.state", "r") as f:
    >>>     state_data = f.read()
    >>>
    >>> state = napalm_yang.base.Root()
    >>> state.add_model(napalm_yang.models.openconfig_interfaces)
    >>> state.parse_config(native=[state_data], profile="junos")