def find(self, item, logical=False):
if isinstance(item, AssetAttributes):<EOL><INDENT>for path in item.search_paths:<EOL><INDENT>try:<EOL><INDENT>return self.find(path, logical)<EOL><DEDENT>except FileNotFound:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>raise FileNotFound(item.path)<EOL><DEDENT>if logical:<EOL><INDENT>asset_attributes = AssetAttributes(self, item)<EOL>suffixes = self.suffixes.find(asset_attributes.mimetype)<EOL>if not suffixes:<EOL><INDENT>return self.find(item)<EOL><DEDENT>path = asset_attributes.path_without_suffix<EOL>for suffix in suffixes:<EOL><INDENT>try:<EOL><INDENT>return self.find(path + suffix)<EOL><DEDENT>except FileNotFound:<EOL><INDENT>continue<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for finder in self.finders:<EOL><INDENT>try:<EOL><INDENT>absolute_path = finder.find(item)<EOL><DEDENT>except FileNotFound:<EOL><INDENT>continue<EOL><DEDENT>return AssetAttributes(self, item), absolute_path<EOL><DEDENT><DEDENT>raise FileNotFound(item)<EOL>
Find files using :attr:`finders` registry. The ``item`` parameter
        can be an instance of :class:`~gears.asset_attributes.AssetAttributes`
        class, a path to the asset or a logical path to the asset. If ``item``
        is a logical path, `logical` parameter must be set to ``True``.

        Returns a tuple with :class:`~gears.asset_attributes.AssetAttributes`
        instance for found file path as first item, and absolute path to this
        file as second item.

        If nothing is found, :class:`gears.exceptions.FileNotFound` exception
        is rased.