code: def _initialize_columns(
      self, cols: Sequence[Hashable] | None
  ) -> np.ndarray:
      # validate mi options
      if self.has_mi_columns:
          if cols is not None:
              msg = (
                  "cannot specify cols with a MultiIndex on the columns"
              )
              raise TypeError(msg)
  
      if cols is not None:
          if isinstance(cols, ABCIndex):
              cols = cols._format_native_types(**self._number_format)
          else:
              cols = list(cols)
          self.obj = self.obj.loc[:, cols]
  
      # update columns to include possible multiplicity of dupes
      # and make sure cols is just a list of labels
      new_cols = self.obj.columns
      return new_cols._format_native_types(**self._number_format)
  
imports: from __future__ import annotations
  import csv
  import os
  from typing import TYPE_CHECKING, Any, Hashable, Iterator, Sequence, cast
  import numpy
  from pandas._libs import writers
  from pandas._typing import CompressionOptions, FilePath, FloatFormatType, IndexLabel, StorageOptions, WriteBuffer
  from pandas.util._decorators import cache_readonly
  from pandas.core.dtypes.generic import ABCDatetimeIndex, ABCIndex, ABCMultiIndex, ABCPeriodIndex
  from pandas.core.dtypes.missing import notna
  from pandas.core.indexes.api import Index
  from pandas.io.common import get_handle
label_desc: Use image node_id 13 for calling the CSVFormatter obj's underlying member method code with example usage: obj._initialize_columns(cols) and returns: new_cols