code: def get_data_filepath(name, environ=None):
      """
      Returns a handle to data file.
  
      Creates containing directory, if needed.
      """
      dr = data_root(environ)
  
      if not os.path.exists(dr):
          os.makedirs(dr)
  
      return os.path.join(dr, name)
  
imports: import os
  from collections import OrderedDict
  import logbook
  import pandas
  import pytz
  from pandas_datareader.data import DataReader
  from six import iteritems
  from six.moves.urllib_error import HTTPError
  from catalyst.constants import LOG_LEVEL
  from catalyst.utils.calendars import get_calendar
  from .None import treasuries, treasuries_can
  from .benchmarks import get_benchmark_returns
  from ..utils.deprecate import deprecated
  from ..utils.paths import cache_root, data_root
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_filepath(name, environ) and returns: os