def prepare_metadata_for_build_wheel(metadata_directory, config_settings):
backend = _build_backend()<EOL>try:<EOL><INDENT>hook = backend.prepare_metadata_for_build_wheel<EOL><DEDENT>except AttributeError:<EOL><INDENT>return _get_wheel_metadata_from_wheel(backend, metadata_directory,<EOL>config_settings)<EOL><DEDENT>else:<EOL><INDENT>return hook(metadata_directory, config_settings)<EOL><DEDENT>
Invoke optional prepare_metadata_for_build_wheel

    Implements a fallback by building a wheel if the hook isn't defined.