code: def _dataflash_dir(self, mpstate):
          '''returns directory path to store DF logs in.  May be relative'''
          if mpstate.settings.state_basedir is None:
              ret = 'dataflash'
          else:
              ret = os.path.join(mpstate.settings.state_basedir,'dataflash')
  
          try:
              os.makedirs(ret)
          except OSError as e:
              if e.errno != errno.EEXIST:
                  print("DFLogger: OSError making (%s): %s" % (ret, str(e)))
          except Exception as e:
              print("DFLogger: Unknown exception making (%s): %s" % (ret, str(e)))
  
          return ref _dataflash_dir(self, mpstate):
          '''returns directory path to store DF logs in.  May be relative'''
          if mpstate.settings.state_basedir is None:
              ret = 'dataflash'
          else:
              ret = os.path.join(mpstate.settings.state_basedir,'dataflash')
  
          try:
              os.makedirs(ret)
          except OSError as e:
              if e.errno != errno.EEXIST:
                  print("DFLogger: OSError making (%s): %s" % (ret, str(e)))
          except Exception as e:
              print("DFLogger: Unknown exception making (%s): %s" % (ret, str(e)))
  
          return ret
docs: returns directory path to store DF logs in.  May be relative