class_docstr: Manages a Mongo-DB for storing metrics and delivering parameters to trials.
  
  The Mongo-DB contains one database that serves as a queue of future trials
  and one to store results of active and finished trials.
  
  Attributes:
      dbpath (str): the path where Mongo-DB stores its files.
      port (int): the port on which the Mongo-DB should run.
      reinstantiated (bool): whether an instance of the MongoDB is being loaded.
      mongodb_args (dict): keyword arguments to MongoDB
class_docstr_tok: ["Manages","a","Mongo-DB","for","storing","metrics","and","delivering","parameters","to","trials",".","The","Mongo-DB","contains","one","database","that","serves","as","a","queue","of","future","trials","and","one","to","store","results","of","active","and","finished","trials",".","Attributes",":","dbpath","(","str",")",":","the","path","where","Mongo-DB","stores","its","files",".","port","(","int",")",":","the","port","on","which","the","Mongo-DB","should","run",".","reinstantiated","(","bool",")",":","whether","an","instance","of","the","MongoDB","is","being","loaded",".","mongodb_args","(","dict",")",":","keyword","arguments","to","MongoDB"]
docstr: Checks whether database is still running.
docstr_tok: ["Checks","whether","database","is","still","running","."]
code: def check_db_status(self):
      """
      Checks whether database is still running.
      """
      status = self.mongo_process.poll()
      if status:
          raise EnvironmentError(
              "Database exited with code {}".format(status)
          )
  
imports: import logging
  import numpy
  import pymongo
  from pymongo import MongoClient
  import subprocess
  import time
  import os
  import socket
  import warnings
  import sherpa
label_desc: Use image node_id 4 for calling the _Database obj's underlying member method code with example usage: obj.check_db_status() without return types