code: def stan_to_dict_numpy(
      column_names: Tuple[str, ...], data: "np.array"
  ):
      import numpy as np
  
      output = OrderedDict()
  
      prev = None
  
      start = 0
      end = 0
      two_dims = len(data.shape) > 1
      for cname in column_names:
          parsed = (
              cname.split(".") if "." in cname else cname.split("[")
          )
          curr = parsed[0]
          if prev is None:
              prev = curr
  
          if curr != prev:
              if prev in output:
                  raise RuntimeError("Found repeated column name")
              if two_dims:
                  output[prev] = np.array(data[:, start:end])
              else:
                  output[prev] = np.array(data[start:end])
              prev = curr
              start = end
          end += 1
      if prev in output:
          raise RuntimeError("Found repeated column name")
      if two_dims:
          output[prev] = np.array(data[:, start:end])
      else:
          output[prev] = np.array(data[start:end])
      return output
  
imports: from __future__ import absolute_import, division, print_function
  from abc import abstractmethod, ABC
  from dataclasses import dataclass
  from typing import Sequence, Tuple
  from collections import OrderedDict
  from enum import Enum
  import importlib_resources
  import platform
  import logging
label_desc: Use image node_id 8 for calling the CmdStanPyBackend obj's underlying member method code with example usage: obj.stan_to_dict_numpy(column_names, data) and returns: output