def auto_need(form):
requirements = form.get_widget_requirements()<EOL>for library, version in requirements:<EOL><INDENT>resources = resource_mapping[library]<EOL>if not isinstance(resources, list):  <EOL><INDENT>resources = [resources]<EOL><DEDENT>for resource in resources:<EOL><INDENT>resource.need()<EOL><DEDENT><DEDENT>
Automatically ``need()`` the relevant Fanstatic resources for a form.

    This function automatically utilises libraries in the ``js.*`` namespace
    (such as ``js.jquery``, ``js.tinymce`` and so forth) to allow Fanstatic
    to better manage these resources (caching, minifications) and avoid
    duplication across the rest of your application.