code: def _get_pivot_names(arrs, names, prefix):
      """
      Generates unique names for rows/columns
      """
      if names is None:
          names = []
          for i, arr in enumerate(arrs):
              if isinstance(arr, cudf.Series) and arr.name is not None:
                  names.append(arr.name)
              else:
                  names.append(f"{prefix}_{i}")
      else:
          if len(names) != len(arrs):
              raise ValueError(
                  "arrays and names must have the same length"
              )
          if not isinstance(names, list):
              names = list(names)
  
      return names
  
imports: import itertools
  import warnings
  from collections import abc
  from typing import Dict, Optional
  import cupy
  import numpy
  import pandas
  import cudf
  from cudf._lib.transform import one_hot_encode
  from cudf._lib.types import size_type_dtype
  from cudf._typing import Dtype
  from cudf.api.extensions import no_default
  from cudf.core.column import ColumnBase, as_column, column_empty_like
  from cudf.core.column.categorical import CategoricalColumn
  from cudf.utils.dtypes import min_unsigned_type
label_desc: Use image node_id 14 for calling a global function with example usage: _get_pivot_names(arrs, names, prefix) and returns: names