def get_data_path(fn, subfolder='data'):
    "Return path to filename ``fn`` in the data folder.\n    During testing it is often necessary to load data files. This\n    function returns the full path to files in the ``data`` subfolder\n    by default.\n    Parameters\n    ----------\n    fn : str\n        File name.\n    subfolder : str, defaults to ``data``\n        Name of the subfolder that contains the data.\n    Returns\n    -------\n    str\n        Inferred absolute path to the test data for the module where\n        ``get_data_path(fn)`` is called.\n    Notes\n    -----\n    The requested path may not point to an existing file, as its\n    existence is not checked.\n    This is from skbio's code base\n    https://github.com/biocore/scikit-bio/blob/master/skbio/util/_testing.py#L50\n    "
    callers_filename = inspect.getouterframes(inspect.currentframe())[1][1]
    path = os.path.dirname(os.path.abspath(callers_filename))
    data_path = os.path.join(path, subfolder, fn)
    return data_path
Return path to filename ``fn`` in the data folder.
During testing it is often necessary to load data files. This
function returns the full path to files in the ``data`` subfolder
by default.
Parameters
----------
fn : str
    File name.
subfolder : str, defaults to ``data``
    Name of the subfolder that contains the data.
Returns
-------
str
    Inferred absolute path to the test data for the module where
    ``get_data_path(fn)`` is called.
Notes
-----
The requested path may not point to an existing file, as its
existence is not checked.
This is from skbio's code base
https://github.com/biocore/scikit-bio/blob/master/skbio/util/_testing.py#L50
def get_data_path(fn, subfolder='data'):
    "Return path to filename ``fn`` in the data folder.\n    During testing it is often necessary to load data files. This\n    function returns the full path to files in the ``data`` subfolder\n    by default.\n    Parameters\n    ----------\n    fn : str\n        File name.\n    subfolder : str, defaults to ``data``\n        Name of the subfolder that contains the data.\n    Returns\n    -------\n    str\n        Inferred absolute path to the test data for the module where\n        ``get_data_path(fn)`` is called.\n    Notes\n    -----\n    The requested path may not point to an existing file, as its\n    existence is not checked.\n    This is from skbio's code base\n    https://github.com/biocore/scikit-bio/blob/master/skbio/util/_testing.py#L50\n    "
    callers_filename = inspect.getouterframes(inspect.currentframe())[1][1]
    path = os.path.dirname(os.path.abspath(callers_filename))
    data_path = os.path.join(path, subfolder, fn)
    return data_path