def list_structures(filename, treename=None):
    """Get a dictionary mapping branch names to leaf structures.

    .. warning:: ``list_structures`` is deprecated and will be removed in
       release 5.0.0.

    Parameters
    ----------
    filename : str
        Path to ROOT file.
    treename : str, optional (default=None)
        Name of tree in the ROOT file
        (optional if the ROOT file has only one tree).

    Returns
    -------
    structures : OrderedDict
        An ordered dictionary mapping branch names to leaf structures.

    """
    warnings.warn("list_structures is deprecated and will be "
                  "removed in 5.0.0.", DeprecationWarning)
    return _librootnumpy.list_structures(filename, treename)