code: def tile(cls, op):
      tensor = op.inputs[0]
      out = op.outputs[0]
      index_path = op.index_path
      ctx = get_context()
      fs = None
      if index_path is not None:
          fs = get_fs(index_path, op.storage_options)
  
      if index_path is not None:
          # check if the index path is empty
          try:
              files = [f for f in fs.ls(index_path) if "proxima_" in f]
              if files:
                  raise ValueError(
                      f"Directory {index_path} contains built proxima index, "
                      f"clean them to perform new index building"
                  )
          except FileNotFoundError:
              # if not exist, create directory
              fs.mkdir(index_path)
  
      # make sure all inputs have known chunk sizes
      if has_unknown_shape(*op.inputs):
          yield
  
      if op.column_number:
          index_chunk_size = op.inputs[0].shape[0] // op.column_number
      else:
          worker_num = len(ctx.get_worker_addresses() or [])
          if worker_num > 0:
              index_chunk_size = max(
                  op.inputs[0].shape[0] // worker_num,
                  DEFAULT_INDEX_SIZE,
              )
          else:
              index_chunk_size = DEFAULT_INDEX_SIZE
  
      if op.topk is not None:
          index_chunk_size = cls._get_atleast_topk_nsplit(
              index_chunk_size, op.topk
          )
  
      # build chunks for writing tensors to mmap files.
      worker_iter = iter(
          itertools.cycle(ctx.get_worker_addresses() or [None])
      )
      chunk_groups = rechunk_tensor(tensor, index_chunk_size)
      out_chunks = []
      offsets = []
      offset = 0
      for chunk_group in chunk_groups:
          offsets.append(offset)
          file_prefix = f"proxima-build-{str(uuid.uuid4())}"
          out_chunks.append(
              build_mmap_chunks(
                  chunk_group,
                  next(worker_iter),
                  file_prefix=file_prefix,
              )
          )
          offset += sum(c.shape[0] for c in chunk_group)
  
      final_out_chunks = []
      for j, chunks in enumerate(out_chunks):
          chunk_op = op.copy().reset_key()
          chunk_op.stage = OperandStage.map
          chunk_op.expect_worker = chunks[0].op.expect_worker
          chunk_op._array_shape = chunks[0].op.total_shape
          chunk_op._array_dtype = chunks[0].dtype
          chunk_op._offset = offsets[j]
          out_chunk = chunk_op.new_chunk(chunks, index=(j,))
          final_out_chunks.append(out_chunk)
  
      logger.warning(f"index chunks count: {len(final_out_chunks)} ")
  
      params = out.params
      params["chunks"] = final_out_chunks
      params["nsplits"] = ((1,) * len(final_out_chunks),)
      new_op = op.copy()
      return new_op.new_tileables(op.inputs, kws=[params])
  
imports: import itertools
  import logging
  import os
  import pickle
  import tempfile
  import uuid
  import numpy
  from ....None import opcodes
  from ....None import tensor
  from ....lib.filesystem import get_fs
  from ....core import OutputType
  from ....core.context import get_context
  from ....core.operand import OperandStage
  from ....serialization.serializables import StringField, Int32Field, Int64Field, DictField, BytesField, TupleField, DataTypeField
  from ....utils import has_unknown_shape, Timer
  from ...operands import LearnOperand, LearnOperandMixin
  from ..core import proxima, get_proxima_type, validate_tensor, available_numpy_dtypes, rechunk_tensor, build_mmap_chunks
label_desc: Use image node_id 17 for calling the ProximaBuilder obj's underlying member method code with example usage: obj.tile(cls, op) and returns: new_op