code: def train(X, y, ns, opt):
      """train model
  
      Parameters
      ----------
      X : ary, shape=(n_samples, n_features)
          features
      y : ary, shape=(n_samples)
          classes
      ns : int
          the number of sensitive features
      opt : object
          options
  
      Returns
      -------
      clr : classifier object
          trained classifier
      """
      if opt.ltype == 4:
          clr = LRwPRType4(eta=opt.eta, C=opt.C)
          clr.fit(X, y, ns, itype=opt.itype)
      else:
          sys.exit("Illegal likelihood fitting type")
  
      return clr
  
file_path: AIF360/aif360/algorithms/inprocessing/kamfadm-2012ecmlpkdd/train_pr.py
imports: import sys
  import argparse
  import os
  import platform
  from subprocess import getoutput
  import logging
  import datetime
  import pickle
  import numpy
  import site
  from fadm import __version__
  from sklearn import __version__
  from fadm.util import fill_missing_with_mean
  from fadm.lr.pr import *
label_desc: Use image node_id 1 for calling a global function with example usage: train(X, y, ns, opt) and returns: clr