def METHOD_NAME(self, var: str) -> np.ndarray:
    """
    Return a numpy.ndarray which contains the estimates for the
    for the named Stan program variable where the dimensions of the
    numpy.ndarray match the shape of the Stan program variable, with
    a leading axis added for the number of draws from the variational
    approximation.
    * If the variable is a scalar variable, the return array has shape
      ( draws, ).
    * If the variable is a vector, the return array has shape
      ( draws, len(vector))
    * If the variable is a matrix, the return array has shape
      ( draws, size(dim 1), size(dim 2) )
    * If the variable is an array with N dimensions, the return array
      has shape ( draws, size(dim 1), ..., size(dim N))
    This functionaltiy is also available via a shortcut using ``.`` -
    writing ``fit.a`` is a synonym for ``fit.stan_variable("a")``
    :param var: variable name
    See Also
    --------
    CmdStanVB.stan_variables
    CmdStanMCMC.stan_variable
    CmdStanMLE.stan_variable
    CmdStanGQ.stan_variable
    """
    try:
        out: np.ndarray = self._metadata.stan_vars[var].extract_reshape(
            self._variational_sample
        )
        return out
    except KeyError:
        # pylint: disable=raise-missing-from
        raise ValueError(
            f'Unknown variable name: {var}\n'
            'Available variables are '
            + ", ".join(self._metadata.stan_vars.keys())
        )