code: def model_params(model):
      """
      Create string of alphabetically sorted parameters of the model
      obtained with get_params or string contaning result of __repr__ call
      """
      s = ""
  
      if hasattr(model, "get_params"):
          params_dict = model.get_params()
          max_len = 0
          for key in params_dict:
              if len(key) > max_len:
                  max_len = len(key)
          sorted_keys = sorted(params_dict.keys())
          for key in sorted_keys:
              s += "%-*s %s\n" % (max_len, key, params_dict[key])
  
      elif hasattr(model, "__repr__"):
          s = model.__repr__()
          s += "\n"
  
      else:
          s = "Model has no ability to show parameters (has no <get_params> or <__repr__>)\n"
  
      s += "\n"
  
      return s
  
file_path: vecstack/vecstack/core.py
imports: from __future__ import print_function
  from __future__ import division
  import os
  import sys
  import warnings
  from datetime import datetime
  import numpy
  import scipy.stats
  from sklearn.model_selection import KFold
  from sklearn.model_selection import StratifiedKFold
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import accuracy_score
  from sklearn.metrics import log_loss
  from sklearn.utils.validation import check_X_y
  from sklearn.utils.validation import check_array
  from sklearn.base import clone
label_desc: Use image node_id 3 for calling a global function with example usage: model_params(model) and returns: s