code: def partial(fn, **kwargs):
      """functools.partial work-alike for functions decorated with
      fmin_pass_expr_memo_ctrl
      """
      rval = functools.partial(fn, **kwargs)
      if hasattr(fn, "fmin_pass_expr_memo_ctrl"):
          rval.fmin_pass_expr_memo_ctrl = fn.fmin_pass_expr_memo_ctrl
      return rval
  
imports: import functools
  import inspect
  import logging
  import os
  import sys
  import time
  from timeit import default_timer
  import numpy
  from hyperopt import tpe, exceptions
  from hyperopt.base import validate_timeout, validate_loss_threshold
  from .None import pyll
  from .utils import coarse_utcnow
  from .None import base
  from .None import progress
label_desc: Use image node_id 4 for calling a global function with example usage: partial(fn) and returns: rval