def add_custom_pattern(mpl_hatch, pattern_name, pattern_definition=None):
    """
        The patterns of tikzpgf are quite simple, and cannot be customized but for the
        color. A solution is to expose a function like this one to allow the user to
        populate _MP_HATCH2PGF_PATTERN with custom (hatch, pattern) pairs. mpl does no
        validation of the hatch string, it just ignores it if it does not recognize it,
        so it is possible to have <any> string be a mpl_hatch.

        If the pattern definition is passed, it could be added at the start of the code
        in a similar fashion to
        > data["custom colors"] = {}
        in get_tikz_code(). tikzplotlib pattern definitions would mend the bad
        correspondence between the mpl hatches and tikz patterns, with custom patterns
        for the mpl hatches 'o' and 'O'

        Want some opinions on this before I implement it..

        From https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.patches.Patch.html:
        > Letters can be combined, in which case all the specified hatchings are done.
        > If same letter repeats, it increases the density of hatching of that pattern.
        To achieve something like this, custom patterns must be created
        https://tex.stackexchange.com/questions/29359/pgfplots-how-to-fill-the-area-
        under-a-curve-with-oblique-lines-hatching-as-a/29367#29367
    """
