human
Here's a good function header given the following:
I wrote the below code

    if (h5py is None):
        raise ImportError('`load_model`    requires    h5py.')
    if (not custom_objects):
        custom_objects = {}
    def convert_custom_objects(obj):
        'Handles    custom    object    lookup.\n\n                                #    Arguments\n                                                obj:    object,    dict,    or    list.\n\n                                #    Returns\n                                                The    same    structure,    where    occurrences\n                                                                of    a    custom    object    name    have    been    replaced\n                                                                with    the    custom    object.\n                                '
        if isinstance(obj, list):
            deserialized = []
            for value in obj:
                deserialized.append(convert_custom_objects(value))
            return deserialized
        if isinstance(obj, dict):
            deserialized = {}
            for (key, value) in obj.items():
                deserialized[key] = convert_custom_objects(value)
            return deserialized
        if (obj in custom_objects):
            return custom_objects[obj]
        return obj
    with h5py.File(filepath, mode='r') as f:
        model_config = f.attrs.get('model_config')
        if (model_config is None):
            raise ValueError('No    model    found    in    config    file.')
        model_config = json.loads(model_config.decode('utf-8'))
        model = model_from_config(model_config, custom_objects=custom_objects)
        topology.load_weights_from_hdf5_group(f['model_weights'], model.layers)
        if (not compile):
            return model
        training_config = f.attrs.get('training_config')
        if (training_config is None):
            warnings.warn('No    training    configuration    found    in    save    file:    the    model    was    *not*    compiled.    Compile    it    manually.')
            return model
   ...

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

def load_model(filepath, custom_objects=None, compile=True):