code: def _inertia(X, sample_weight, centers, labels):
      op = KMeansInertia(
          x=X,
          sample_weight=sample_weight,
          centers=centers,
          labels=labels,
      )
      return op()
  
imports: import numpy
  from ...None import opcodes
  from ...None import tensor
  from ...core import OutputType, recursive_tile
  from ...serialization.serializables import KeyField
  from ...tensor.array_utils import as_same_device, device, sparse
  from ...tensor.core import TensorOrder
  from ...utils import has_unknown_shape
  from ..operands import LearnOperand, LearnOperandMixin
  from ._k_means_fast import _inertia_dense, _inertia_sparse, merge_update_chunks
label_desc: Use image node_id 1 for calling a global function with example usage: _inertia(X, sample_weight, centers, labels) and returns: op