code: def __init__(
      self,
      class_name: str,
      method_name: Optional[str] = None,
      arg_name: Optional[str] = None,
      property_name: Optional[str] = None,
      scalar_name: Optional[str] = None,
      deprecated: bool = False,
      reason: str = "",
  ):
      assert [
          method_name is not None,
          property_name is not None,
          scalar_name is not None,
      ].count(True) == 1
      self.class_name = class_name
      self.method_name = method_name
      self.arg_name = arg_name
      if method_name is not None:
          if arg_name is not None:
              msg = "The method `{0}.{1}()` does not support `{2}` parameter. {3}".format(
                  class_name, method_name, arg_name, reason
              )
          else:
              if deprecated:
                  msg = (
                      "The method `{0}.{1}()` is deprecated in pandas and will therefore "
                      + "not be supported in pandas-on-Spark. {2}"
                  ).format(class_name, method_name, reason)
              else:
                  if reason == "":
                      reason = " yet."
                  else:
                      reason = ". " + reason
                  msg = "The method `{0}.{1}()` is not implemented{2}".format(
                      class_name, method_name, reason
                  )
      elif scalar_name is not None:
          msg = (
              "The scalar `{0}.{1}` is not reimplemented in pyspark.pandas;"
              " use `pd.{1}`.".format(class_name, scalar_name)
          )
      else:
          if deprecated:
              msg = (
                  "The property `{0}.{1}()` is deprecated in pandas and will therefore "
                  + "not be supported in pandas-on-Spark. {2}"
              ).format(class_name, property_name, reason)
          else:
              if reason == "":
                  reason = " yet."
              else:
                  reason = ". " + reason
              msg = "The property `{0}.{1}()` is not implemented{2}".format(
                  class_name, property_name, reason
              )
      super().__init__(msg)
  
file_path: spark/python/pyspark/pandas/exceptions.py
imports: from typing import Optional
label_desc: Use image node_id 1 to create a new PandasNotImplementedError object from inherited base classes: NotImplementedError with example: obj = PandasNotImplementedError(class_name, method_name, arg_name, property_name, scalar_name, deprecated, reason)