code: def make_partition(
      columns: list, dtypes: dict[str, type | str], index, kwargs, state
  ):
      data = {}
      for k, dt in dtypes.items():
          kws = {
              kk.rsplit("_", 1)[1]: v
              for kk, v in kwargs.items()
              if kk.rsplit("_", 1)[0] == k
          }
          # Note: we compute data for all dtypes in order, not just those in the output
          # columns. This ensures the same output given the same state_data, regardless
          # of whether there is any column projection.
          # cf. https://github.com/dask/dask/pull/9538#issuecomment-1267461887
          result = make[dt](len(index), state, **kws)
          if k in columns:
              data[k] = result
      df = pd.DataFrame(data, index=index, columns=columns)
      update_dtypes = {
          k: v
          for k, v in dtypes.items()
          if k in columns and not same_astype(v, df[k].dtype)
      }
      if update_dtypes:
          df = df.astype(update_dtypes, copy=False)
      return df
  
imports: from __future__ import annotations
  import re
  import string
  from dataclasses import asdict, dataclass, field
  from typing import Any, Callable, cast
  import numpy
  import pandas
  from dask.dataframe._compat import PANDAS_GE_220
  from dask.dataframe._pyarrow import is_object_string_dtype
  from dask.dataframe.core import tokenize
  from dask.dataframe.io.io import from_map
  from dask.dataframe.io.utils import DataFrameIOFunction
  from dask.utils import random_state_data
label_desc: Use image node_id 8 for calling a global function with example usage: make_partition(columns, dtypes, index, kwargs, state) and returns: df