class_docstr: Container for inference data storage using xarray.
  
  For a detailed introduction to ``InferenceData`` objects and their usage, see
  :ref:`xarray_for_arviz`. This page provides help and documentation
  on ``InferenceData`` methods and their low level implementation.
class_docstr_tok: ["Container","for","inference","data","storage","using","xarray",".","For","a","detailed","introduction","to","``","InferenceData","``","objects","and","their","usage",",","see",":","ref",":","`","xarray_for_arviz","`",".","This","page","provides","help","and","documentation","on","``","InferenceData","``","methods","and","their","low","level","implementation","."]
docstr: Initialize object from a zarr store or path.
  
  Expects that the zarr store will have groups, each of which can be loaded by xarray.
  By default, the datasets of the InferenceData object will be lazily loaded instead
  of being loaded into memory. This
  behaviour is regulated by the value of ``az.rcParams["data.load"]``.
  
  Parameters
  ----------
  store: MutableMapping or zarr.hierarchy.Group or str.
      Zarr storage class or path to desired Store.
  
  Returns
  -------
  InferenceData object
  
  References
  ----------
  https://zarr.readthedocs.io/
docstr_tok: ["Initialize","object","from","a","zarr","store","or","path",".","Expects","that","the","zarr","store","will","have","groups",",","each","of","which","can","be","loaded","by","xarray",".","By","default",",","the","datasets","of","the","InferenceData","object","will","be","lazily","loaded","instead","of","being","loaded","into","memory",".","This","behaviour","is","regulated","by","the","value","of","``","az.rcParams","[","``","data.load","''","]","``",".","Parameters","--","--","--","--","--","store",":","MutableMapping","or","zarr.hierarchy.Group","or","str",".","Zarr","storage","class","or","path","to","desired","Store",".","Returns","--","--","--","-","InferenceData","object","References","--","--","--","--","--","https",":","\/\/zarr.readthedocs.io\/"]
code: def from_zarr(store) -> "InferenceData":
      """Initialize object from a zarr store or path.
  
      Expects that the zarr store will have groups, each of which can be loaded by xarray.
      By default, the datasets of the InferenceData object will be lazily loaded instead
      of being loaded into memory. This
      behaviour is regulated by the value of ``az.rcParams["data.load"]``.
  
      Parameters
      ----------
      store: MutableMapping or zarr.hierarchy.Group or str.
          Zarr storage class or path to desired Store.
  
      Returns
      -------
      InferenceData object
  
      References
      ----------
      https://zarr.readthedocs.io/
      """
      try:
          import zarr
  
          assert version.parse(zarr.__version__) >= version.parse(
              "2.5.0"
          )
      except (ImportError, AssertionError) as err:
          raise ImportError(
              "'to_zarr' method needs Zarr (2.5.0+) installed."
          ) from err
  
      # Check store type and create store if necessary
      if isinstance(store, str):
          store = zarr.storage.DirectoryStore(path=store)
      elif isinstance(store, zarr.hierarchy.Group):
          store = store.store
      elif not isinstance(store, MutableMapping):
          raise TypeError(f"No valid store found: {store}")
  
      groups = {}
      zarr_handle = zarr.open(store, mode="r")
  
      # Open each group via xarray method
      for key_group, _ in zarr_handle.groups():
          with xr.open_zarr(store=store, group=key_group) as data:
              groups[key_group] = (
                  data.load()
                  if rcParams["data.load"] == "eager"
                  else data
              )
  
      with xr.open_zarr(store=store) as root:
          attrs = root.attrs
  
      return InferenceData(attrs=attrs, **groups)
  
imports: import os
  import re
  import sys
  import uuid
  import warnings
  from collections import OrderedDict, defaultdict
  from collections.abc import MutableMapping, Sequence
  from copy import copy
  from copy import deepcopy
  from datetime import datetime
  from html import escape
  from typing import TYPE_CHECKING, Any, Iterable, Iterator, List, Mapping, Optional, Tuple, TypeVar, Union, overload
  import numpy
  import xarray
  from packaging import version
  from ..rcparams import rcParams
  from ..utils import HtmlTemplate, _subset_list, _var_names, either_dict_or_kwargs
  from .base import _extend_xr_method, _make_json_serializable, dict_to_dataset
label_desc: Use image node_id 24 for calling the InferenceData obj's underlying member method code with example usage: obj.from_zarr(store) and returns: InferenceData