code: def get_connection(**kwargs):
      
      try:
          logging.debug("Connecting to mapd db...")
          con = pymapd.connect(
              user=kwargs["db_user"],
              password=kwargs["db_passwd"],
              host=kwargs["db_server"],
              port=kwargs["db_port"],
              dbname=kwargs["db_name"],
          )
          logging.info("Succesfully connected to mapd db")
          return con
      except (pymapd.exceptions.OperationalError, pymapd.exceptions.Error):
          logging.exception("Error connecting to database.")
          return False
docs: Connects to the db using pymapd
        https://pymapd.readthedocs.io/en/latest/usage.html#connecting
  
        Kwargs:
          db_user(str): DB username
          db_passwd(str): DB password
          db_server(str): DB host
          db_port(int): DB port
          db_name(str): DB name
  
        Returns:
          con(class): Connection class
          False(bool): The connection failed. Exception should be logged.