code: def check_dimensional_equality_of_param_list_arrays(param_list):
      
      try:
          num_dimensions = len(param_list[0].shape)
          assert num_dimensions in [1, 2]
          assert all([(x is None or (len(x.shape) == num_dimensions))
                      for x in param_list])
      except AssertionError:
          msg = "Each array in param_list should be 1D or 2D."
          msg_2 = "And all arrays should have the same number of dimensions."
          total_msg = msg + "\n" + msg_2
          raise ValueError(total_msg)
  
      return None
docs: Ensures that all arrays in param_list have the same dimension, and that
      this dimension is either 1 or 2 (i.e. all arrays are 1D arrays or all
      arrays are 2D arrays.) Raises a helpful ValueError if otherwise.
  
      Parameters
      ----------
      param_list : list of ndarrays or None.
  
      Returns
      -------
      None.