class_docstr: Imputed Data
  
  This class should not be instantiated directly.
  Instead, it is returned when ImputationKernel.impute_new_data() is called.
  For parameter arguments, see ImputationKernel documentation.
class_docstr_tok: ["Imputed","Data","This","class","should","not","be","instantiated","directly",".","Instead",",","it","is","returned","when","ImputationKernel.impute_new_data","(",")","is","called",".","For","parameter","arguments",",","see","ImputationKernel","documentation","."]
docstr: Grabs the iteration count for specified variables, datasets.
  If the iteration count is not consistent across the provided
  datasets/variables, an error will be thrown. Providing None
  will use all datasets/variables.
  
  This is to ensure the process is in a consistent state when
  the iteration count is needed.
  
  Parameters
  ----------
  datasets: int or list[int]
      The datasets to check the iteration count for.
  variables: int, str, list[int] or list[str]:
      The variables to check the iteration count for.
      Variables can be specified by their names or indexes.
  
  Returns
  -------
  An integer representing the iteration count.
docstr_tok: ["Grabs","the","iteration","count","for","specified","variables",",","datasets",".","If","the","iteration","count","is","not","consistent","across","the","provided","datasets\/variables",",","an","error","will","be","thrown",".","Providing","None","will","use","all","datasets\/variables",".","This","is","to","ensure","the","process","is","in","a","consistent","state","when","the","iteration","count","is","needed",".","Parameters","--","--","--","--","--","datasets",":","int","or","list","[","int","]","The","datasets","to","check","the","iteration","count","for",".","variables",":","int",",","str",",","list","[","int","]","or","list","[","str","]",":","The","variables","to","check","the","iteration","count","for",".","Variables","can","be","specified","by","their","names","or","indexes",".","Returns","--","--","--","-","An","integer","representing","the","iteration","count","."]
code: def iteration_count(self, datasets=None, variables=None):
      """
      Grabs the iteration count for specified variables, datasets.
      If the iteration count is not consistent across the provided
      datasets/variables, an error will be thrown. Providing None
      will use all datasets/variables.
  
      This is to ensure the process is in a consistent state when
      the iteration count is needed.
  
      Parameters
      ----------
      datasets: int or list[int]
          The datasets to check the iteration count for.
      variables: int, str, list[int] or list[str]:
          The variables to check the iteration count for.
          Variables can be specified by their names or indexes.
  
      Returns
      -------
      An integer representing the iteration count.
      """
  
      ds = (
          list(range(self.dataset_count()))
          if datasets is None
          else _ensure_iterable(datasets)
      )
  
      if variables is None:
          var = self.variable_training_order
      else:
          variables = _ensure_iterable(variables)
          var = self._get_var_ind_from_list(variables)
  
      assert set(var).issubset(self.variable_training_order)
  
      iter_indx = [self.variable_training_order.index(v) for v in var]
      ds_uniq = np.unique(self.iterations[np.ix_(ds, iter_indx)])
      if len(ds_uniq) == 0:
          return -1
      if len(ds_uniq) > 1:
          raise ValueError(
              "iterations were not consistent across provided datasets, variables."
          )
  
      return ds_uniq[0]
  
imports: import numpy
  from .compat import pd_DataFrame
  from .utils import _t_dat, _t_var_list, _t_var_dict, _ensure_iterable, _dict_set_diff, _assign_col_values_without_copy, _slice, _subset_data
  from itertools import combinations
  from typing import Dict, List, Union, Any, Optional
  from warnings import warn
label_desc: Use image node_id 18 for calling the ImputedData obj's underlying member method code with example usage: obj.iteration_count(datasets, variables) and returns: ds_uniq, unknown