human
I wrote the below code

    if (not params.init_model):
        return None
    is_trainable = (lambda x: (x in tf.trainable_variables()))
    var_list = []
    for scope in scopes:
        var_list.extend(filter(is_trainable, tf.contrib.framework.get_model_variables(scope)))
    (init_assign_op, init_feed_dict) = slim.assign_from_checkpoint(params.init_model, var_list)
    def init_assign_function(sess):
        sess.run(init_assign_op, init_feed_dict)
    return init_assign_function

What's a good function header?
assistant
#Here's a good function header.

def get_init_fn(scopes, params):