docstr: Adds provided batch_size to existing dims.
  
  If dims is (None, 5, 2), returns (batch_size, 5, 2)
  
  Args:
    dims: Dimensions
    batch_size: batch_size
  
  Returns:
    dims with batch_size added as first parameter of list.
docstr_tok: ["Adds","provided","batch_size","to","existing","dims",".","If","dims","is","(","None",",","5",",","2",")",",","returns","(","batch_size",",","5",",","2",")","Args",":","dims",":","Dimensions","batch_size",":","batch_size","Returns",":","dims","with","batch_size","added","as","first","parameter","of","list","."]
code: def _batch(self, dims, batch_size):
      """Adds provided batch_size to existing dims.
  
      If dims is (None, 5, 2), returns (batch_size, 5, 2)
  
      Args:
        dims: Dimensions
        batch_size: batch_size
  
      Returns:
        dims with batch_size added as first parameter of list.
      """
      if dims[0] is None:
          dims[0] = batch_size
      return dims
  
imports: import tempfile
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.keras import test_utils
  from tensorflow_model_optimization.python.core.sparsity.keras import prune
  from tensorflow_model_optimization.python.core.sparsity.keras import prune_registry
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_callbacks
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_schedule
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_wrapper
  from tensorflow_model_optimization.python.core.sparsity.keras import test_utils
label_desc: Use image node_id 1 for calling the PruneIntegrationTest obj's underlying member method code with example usage: obj._batch(dims, batch_size) and returns: dims