code: def create_database(config, usernames, cpu, name):
      """Create new database for Auptimizer
  
      :param config: contains ``SQLITE_FILE``, ``gpu_mapping`` under ``Auptimizer`` section
      :type config: configparser.ConfigParser
      :param usernames: list of username, not used
      :type usernames: list(str)
      :param cpu: number of CPUs for parallel jobs
      :type cpu: int
      :param name: node information, not used
      :type name: str
      """
      try:
          file = config.get("Auptimizer", "SQLITE_FILE")
      except Exception as e:
          logger.fatal(
              "failed to retrieve SQLITE_FILE from aup environment"
          )
          raise e
      conn = _create_connection(file)
      c = conn.cursor()
  
      # User Table
      c.execute("DROP TABLE IF EXISTS user;")
      c.execute(
          """CREATE TABLE user
          (uid INTEGER PRIMARY KEY NOT NULL, name TEXT UNIQUE, permission BLOB);"""
      )
  
      # Resource Table
      c.execute("DROP TABLE IF EXISTS resource;")
      c.execute(
          """CREATE TABLE resource
          (rid INTEGER PRIMARY KEY NOT NULL, name TEXT, type TEXT, status TEXT)"""
      )
  
      # Experiment Table
      c.execute("DROP TABLE IF EXISTS experiment;")
      c.execute(
          """CREATE TABLE experiment 
          (eid INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, uid INTEGER, name TEXT, start_time INTEGER, end_time INTEGER,
           status TEXT CHECK(status IN ('CREATED', 'RUNNING', 'STOPPED', 'FINISHED', 'FAILED', 'STOPPING', 'REQUEST_STOP')),
           exp_config BLOB, error_msg TEXT NULL,
          FOREIGN KEY(uid) REFERENCES user(uid));"""
      )
  
      # Job Table
      c.execute("DROP TABLE IF EXISTS job;")
      c.execute(
          """CREATE TABLE job
          (jid INTEGER PRIMARY KEY NOT NULL, score REAL, eid INTEGER, start_time INTEGER, end_time INTEGER,
          status TEXT CHECK(status IN ('RUNNING', 'EARLY_STOPPED', 'FINISHED', 'FAILED')),
          job_config BLOB,
          FOREIGN KEY(eid) REFERENCES experiment(eid));"""
      )
  
      # Job Attempt Table
      c.execute("DROP TABLE IF EXISTS job_attempt;")
      c.execute(
          """CREATE TABLE job_attempt
          (jaid INTEGER PRIMARY KEY NOT NULL, jid INTEGER, num INTEGER, rid INTEGER, start_time INTEGER, end_time INTEGER,
          FOREIGN KEY(jid) REFERENCES job(jid),
          FOREIGN KEY(rid) REFERENCES resource(rid));"""
      )
  
      # Intermediate result table
      c.execute("DROP TABLE IF EXISTS intermediate_result;")
      c.execute(
          """CREATE TABLE intermediate_result
          (irid INTEGER PRIMARY KEY NOT NULL, num INTEGER, score REAL, jid INTEGER, receive_time INTEGER,
          FOREIGN KEY(jid) REFERENCES job(jid));"""
      )
  
      # Multiple results table
      c.execute("DROP TABLE IF EXISTS multiple_result;")
      c.execute(
          """CREATE TABLE multiple_result
          (mrid INTEGER PRIMARY KEY NOT NULL, label_order INTEGER, value REAL, receive_time INTEGER, \
              jid INTEGER, irid INTEGER, eid INTEGER, is_last_result INTERGER,
          FOREIGN KEY(jid) REFERENCES job(jid),
          FOREIGN KEY(irid) REFERENCES intermediate_result(irid),
          FOREIGN KEY(eid) REFERENCES experiment(eid));"""
      )
  
      for username in usernames:
          # currently no specific limitation
          c.execute(
              "INSERT INTO user (name, permission) VALUES (?,?)",
              (username, "all"),
          )
  
      _insert_resource(config, "gpu_mapping", c, name, "gpu")
      _insert_resource(config, "node_mapping", c, "remote", "node")
      _insert_resource(config, "aws_mapping", c, "remote", "aws")
  
      for i in range(cpu):
          c.execute(
              "INSERT INTO resource (name, type, status) VALUES (?,?,?)",
              (name, "cpu", "free"),
          )
      c.execute(
          "INSERT INTO resource (name, type, status) VALUES (?,?,?)",
          (name, "passive", "free"),
      )
      conn.commit()
      conn.close()
  
      # print("\033[93mSQLite3 Database is created at %s\033[0m" % config.get("Auptimizer", "SQLITE_FILE"))
      logger.info(
          "SQLite3 Database is created at %s"
          % config.get("Auptimizer", "SQLITE_FILE")
      )
  
file_path: auptimizer/src/aup/setupdb/sqlite.py
imports: import sqlite3
  import os
  import click
  import json
  import logging
  import coloredlogs
  from ..utils import get_default_username, LOG_LEVEL
  from six.moves.configparser import ConfigParser
label_desc: Use image node_id 3 for calling a global function with example usage: create_database(config, usernames, cpu, name) without return types