code: def compare_to_sk_learn(
      max_epoch: int,
      train_loader: DataLoader,
      val_loader: DataLoader,
      train_prop: float,
      sklearn_model_type: str,
      pytorch_model_type: str,
      norm_type: Optional[str],
      objective: str,
      alpha: float,
      init_scheme: str = "zeros",
  ):
      if "LinearRegression" not in sklearn_model_type:
          sklearn_classifier = getattr(
              pytorch_model_module, sklearn_model_type
          )(alpha=alpha)
      else:
          sklearn_classifier = getattr(
              pytorch_model_module, sklearn_model_type
          )()
  
      pytorch_classifier = getattr(
          pytorch_model_module, pytorch_model_type
      )(
          norm_type=args.norm_type,
      )
  
      sklearn_stats = sklearn_classifier.fit(
          train_data=train_loader,
          norm_input=args.norm_sklearn,
      )
      pytorch_stats = pytorch_classifier.fit(
          train_data=train_loader,
          max_epoch=max_epoch,
          init_scheme=init_scheme,
          alpha=alpha,
      )
  
      sklearn_stats.update(_evaluate(val_loader, sklearn_classifier))
      pytorch_stats.update(_evaluate(val_loader, pytorch_classifier))
  
      train_stats_pytorch = _evaluate(train_loader, pytorch_classifier)
      train_stats_sklearn = _evaluate(train_loader, sklearn_classifier)
  
      o_pytorch = {"l2": train_stats_pytorch["l2"]}
      o_sklearn = {"l2": train_stats_sklearn["l2"]}
  
      pytorch_h = pytorch_classifier.representation()
      sklearn_h = sklearn_classifier.representation()
      if objective == "ridge":
          o_pytorch["l2_reg"] = alpha * pytorch_h.norm(p=2, dim=-1)
          o_sklearn["l2_reg"] = alpha * sklearn_h.norm(p=2, dim=-1)
      elif objective == "lasso":
          o_pytorch["l1_reg"] = alpha * pytorch_h.norm(p=1, dim=-1)
          o_sklearn["l1_reg"] = alpha * sklearn_h.norm(p=1, dim=-1)
  
      rel_diff = (
          sum(o_sklearn.values()) - sum(o_pytorch.values())
      ) / abs(sum(o_sklearn.values()))
      return (
          {
              "objective_rel_diff": rel_diff.tolist(),
              "objective_pytorch": o_pytorch,
              "objective_sklearn": o_sklearn,
          },
          sklearn_stats,
          pytorch_stats,
      )
  
file_path: captum/tests/utils/models/linear_models/_test_linear_classifier.py
imports: import argparse
  import random
  from typing import Optional
  import captum._utils.models.linear_model.model
  import numpy
  import sklearn.datasets
  import torch
  from tests.utils.test_linear_model import _evaluate
  from torch.utils.data import DataLoader, TensorDataset
label_desc: Use image node_id 2 for calling a global function with example usage: compare_to_sk_learn(max_epoch, train_loader, val_loader, train_prop, sklearn_model_type, pytorch_model_type, norm_type, objective, alpha, init_scheme) and returns: dict,  sklearn_stats,  pytorch_stats