def METHOD_NAME(in_wrapper):
    print('on_pre_instantiation')
    # Set the hda_directory parameter to the directory that contains the
    # example .hda files
    hda_directory = get_hda_directory()
    print('Setting "hda_directory" to {0}'.format(hda_directory))
    in_wrapper.set_string_parameter_value('hda_directory', hda_directory)
    # Cook the HDA (not PDG yet)
    in_wrapper.recook()