code: def _coo_todense_hlo(
      platform,
      gpu_sparse,
      data,
      row,
      col,
      *,
      shape,
      data_dtype,
      index_dtype,
  ):
      """COO to dense matrix."""
      data_type, _, nnz = _validate_coo_hlo(data, row, col)
      rows, cols = shape
  
      buffer_size, opaque = gpu_sparse.build_coo_todense_descriptor(
          data_dtype, index_dtype, rows, cols, nnz
      )
  
      out = custom_call(
          f"{platform}sparse_coo_todense",
          result_types=[
              ir.RankedTensorType.get(shape, data_type),
              ir.RankedTensorType.get(
                  [buffer_size], ir.IntegerType.get_signless(8)
              ),
          ],
          operands=[data, row, col],
          backend_config=opaque,
          operand_layouts=[[0]] * 3,
          result_layouts=[[1, 0], [0]],
      ).results
      return out[0]
  
file_path: jax/jaxlib/gpu_sparse.py
imports: import math
  from functools import partial
  import importlib
  import jaxlib.mlir.ir
  import numpy
  from jaxlib import xla_client
  from .hlo_helpers import custom_call, mk_result_types_and_shapes
label_desc: Use image node_id 7 for calling a global function with example usage: _coo_todense_hlo(platform, gpu_sparse, data, row, col) and returns: out