<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resource(name):
 """ Return the full path of a named resource in the static directory. If multiple files with the same name exist, **name** should contain the first directory as well. .. code-block:: python resource("myfile") resource("test01/test.txt") resource("test02/test.txt") """

    for path, _, files in os.walk(staticdir()):
        if name in files:
            return os.path.abspath(os.path.join(path, name))