code: def data_dir(default='data'):
      
      if 'OPENSHIFT_DATA_DIR' in os.environ:
          return os.environ['OPENSHIFT_DATA_DIR']
      if 'GONDOR_DATA_DIR' in os.environ:
          return os.environ['GONDOR_DATA_DIR']
      if provider.detect() == provider.DOTCLOUD:
          return os.path.expanduser('~/data')
      return default
docs: Return persistent data directory or ``default`` if not found
      Warning: Do not use this directory to store sqlite databases in producction