code: def rechunk(
      a: TileableType,
      chunk_size: chunk_size_type,
      reassign_worker=False,
  ):
      if not any(pd.isna(s) for s in a.shape) and not a.is_coarse():
          if not has_unknown_shape(a):
              # do client check only when no unknown shape,
              # real nsplits will be recalculated inside `tile`
              chunk_size = _get_chunk_size(a, chunk_size)
              if chunk_size == a.nsplits:
                  return a
  
      op = DataFrameRechunk(
          chunk_size=chunk_size,
          reassign_worker=reassign_worker,
      )
      return op(a)
  
file_path: mars/mars/dataframe/base/rechunk.py
imports: from typing import Tuple
  import numpy
  import pandas
  from ...None import opcodes
  from ...core import OutputType
  from ...serialization.serializables import AnyField
  from ...tensor.rechunk.core import get_nsplits, gen_rechunk_infos, chunk_size_type
  from ...typing import TileableType
  from ...utils import has_unknown_shape
  from ..initializer import DataFrame, Series, Index
  from ..operands import DataFrameOperand, DataFrameOperandMixin, DATAFRAME_TYPE
  from ..utils import indexing_index_value, merge_index_value
label_desc: Use image node_id 2 for calling a global function with example usage: rechunk(a, chunk_size, reassign_worker) and returns: op, a