class_docstr: Base class for structural time series models.
  
  A StructuralTimeSeries object represents a declarative specification of a
  structural time series model, including priors on model parameters.
  It implements a joint probability model
    `p(params, y) = p(params) p(y | params)`,
  where `params` denotes a list of real-valued parameters specified by the child
  class, and `p(y | params)` is a linear Gaussian state space model with
  structure determined by the child class.
class_docstr_tok: ["Base","class","for","structural","time","series","models",".","A","StructuralTimeSeries","object","represents","a","declarative","specification","of","a","structural","time","series","model",",","including","priors","on","model","parameters",".","It","implements","a","joint","probability","model","`","p","(","params",",","y",")","=","p","(","params",")","p","(","y","|","params",")","`",",","where","`","params","`","denotes","a","list","of","real-valued","parameters","specified","by","the","child","class",",","and","`","p","(","y","|","params",")","`","is","a","linear","Gaussian","state","space","model","with","structure","determined","by","the","child","class","."]
docstr: If given an ordered list of parameter values, build a name:value map.
  
  This is a utility method that allows parameter values to be specified as
  either lists or dicts, by transforming lists to a canonical dict
  representation.
  
  Args:
    param_vals: Python list (or other `iterable`) of `Tensor` values
      corresponding to the parameters listed in `self.parameters`,
      OR a map (Python `dict`) of parameter names to values.
  
  Returns:
    param_map: Python `dict` mapping from the names given in `self.parameters`
      to the specified parameter values.
docstr_tok: ["If","given","an","ordered","list","of","parameter","values",",","build","a","name",":","value","map",".","This","is","a","utility","method","that","allows","parameter","values","to","be","specified","as","either","lists","or","dicts",",","by","transforming","lists","to","a","canonical","dict","representation",".","Args",":","param_vals",":","Python","list","(","or","other","`","iterable","`",")","of","`","Tensor","`","values","corresponding","to","the","parameters","listed","in","`","self.parameters","`",",","OR","a","map","(","Python","`","dict","`",")","of","parameter","names","to","values",".","Returns",":","param_map",":","Python","`","dict","`","mapping","from","the","names","given","in","`","self.parameters","`","to","the","specified","parameter","values","."]
code: def _canonicalize_param_vals_as_map(self, param_vals):
      """If given an ordered list of parameter values, build a name:value map.
  
      This is a utility method that allows parameter values to be specified as
      either lists or dicts, by transforming lists to a canonical dict
      representation.
  
      Args:
        param_vals: Python list (or other `iterable`) of `Tensor` values
          corresponding to the parameters listed in `self.parameters`,
          OR a map (Python `dict`) of parameter names to values.
  
      Returns:
        param_map: Python `dict` mapping from the names given in `self.parameters`
          to the specified parameter values.
      """
      if hasattr(param_vals, "keys"):
          param_map = param_vals
      else:
          param_map = {
              p.name: v for (p, v) in zip(self.parameters, param_vals)
          }
  
      return param_map
  
imports: import collections
  import types
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import joint_distribution_auto_batched
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.sts.internal import util
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 11 for calling the StructuralTimeSeries obj's underlying member method code with example usage: obj._canonicalize_param_vals_as_map(param_vals) and returns: param_map