class_docstr: Convertor between RDD and Spark DataFrame.
class_docstr_tok: ["Convertor","between","RDD","and","Spark","DataFrame","."]
code: def _save_partition_key_schema(
      self, df: SparkDataFrame, partition_key: Union[str, Sequence[str]]
  ):
      col_name_to_schema = dict((col.name, col) for col in df.schema)
      self._partition_key_schema = []
      if isinstance(partition_key, str):
          self._partition_key_schema.append(
              col_name_to_schema[partition_key]
          )
      else:
          for column_name in partition_key:
              self._partition_key_schema.append(
                  col_name_to_schema[column_name]
              )
  
imports: import abc
  import copy
  from collections import namedtuple
  from dataclasses import dataclass
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union
  import pipeline_dp
  import pyspark
label_desc: Use image node_id 3 for calling the SparkConverter obj's underlying member method code with example usage: obj._save_partition_key_schema(df, partition_key) without return types