class_docstr: Base class for variable distribution strategies.
  
  A `Distribution` has following key functionalities:
  
  1. Distribute the model variables to a `DeviceMesh`.
  2. Distribute the input data to a `DeviceMesh`.
  3. Distribute an intermediate state tensor in the model.
  
  It can create a context scope so that the framework to properly detect the
  `Distribution` and distribute the variable/data accordingly.
  
  Args:
      device_mesh: A `DeviceMesh` instance.
class_docstr_tok: ["Base","class","for","variable","distribution","strategies",".","A","`","Distribution","`","has","following","key","functionalities",":","1",".","Distribute","the","model","variables","to","a","`","DeviceMesh","`",".","2",".","Distribute","the","input","data","to","a","`","DeviceMesh","`",".","3",".","Distribute","an","intermediate","state","tensor","in","the","model",".","It","can","create","a","context","scope","so","that","the","framework","to","properly","detect","the","`","Distribution","`","and","distribute","the","variable\/data","accordingly",".","Args",":","device_mesh",":","A","`","DeviceMesh","`","instance","."]
docstr: Retrieve the `TensorLayout` for the variable.
  
  Args:
      variable: A `KerasVariable` instance.
  
  return:
      The `TensorLayout` for the variable, which can be used by
      `backend.distribute_value()` to redistribute a variable.
code: def get_variable_layout(self, variable):
      """Retrieve the `TensorLayout` for the variable.
  
      Args:
          variable: A `KerasVariable` instance.
  
      return:
          The `TensorLayout` for the variable, which can be used by
          `backend.distribute_value()` to redistribute a variable.
      """
      raise NotImplementedError()
  
imports: import collections
  import contextlib
  import os
  import re
  import warnings
  import numpy
  from keras.api_export import keras_export
  from keras.backend import KerasTensor
  from keras.backend import distribution_lib
  from keras.backend.common import global_state
label_desc: Use image node_id 3 for calling the Distribution obj's underlying member method code with example usage: obj.get_variable_layout(variable) without return types