code: def convert_sparkml_linear_model(operator, device, extra_config):
      """
      Converter for `pyspark.ml.classification.LogisticRegressionModel`
  
      Args:
          operator: An operator wrapping a `pyspark.ml.classification.LogisticRegressionModel`
          device: String defining the type of device the converted operator should be run on
          extra_config: Extra configuration used to select the best conversion strategy
  
      Returns:
          A PyTorch model
      """
      num_classes = operator.raw_operator.numClasses
      # Spark ML assumes the label column is encoded such that labels start from zero.
      classes = [i for i in range(num_classes)]
  
      coefficients = (
          operator.raw_operator.coefficientMatrix.toArray()
          .transpose()
          .astype("float32")
      )
      intercepts = operator.raw_operator.interceptVector.reshape(
          1, -1
      ).astype("float32")
  
      if num_classes > 2:
          multi_class = "multinomial"
      else:
          multi_class = None
  
      return LinearModel(
          operator,
          coefficients,
          intercepts,
          device,
          classes=classes,
          multi_class=multi_class,
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: convert_sparkml_linear_model(operator, device, extra_config) and returns: LinearModel