The module treematching allow you to write patterns to match subtrees in any trees of python objects.
https://anaconda.org/conda-forge/treematching/badges/version.svg
https://anaconda.org/conda-forge/treematching/badges/latest_release_date.svg
https://anaconda.org/conda-forge/treematching/badges/latest_release_relative_date.svg
https://anaconda.org/conda-forge/treematching/badges/platforms.svg
https://anaconda.org/conda-forge/treematching/badges/license.svg
https://anaconda.org/conda-forge/treematching/badges/downloads.svg