code: def _create_paths(self, basedir, name=None):
          
          if name:
              datapath = os.path.join(basedir, name)
          else:
              datapath = basedir
  
          dbpath = os.path.join(datapath, 'db')
          if not os.path.exists(dbpath):
              os.makedirs(dbpath)
          if self.args['verbose']:
              print('creating directory: %s' % dbpath)
  
          return datapath
docs: Create datadir and subdir paths.