code: def __init__(
      self,
      database,
      datarun,
      save_files=True,
      cloud_mode=False,
      aws_access_key=None,
      aws_secret_key=None,
      s3_bucket=None,
      s3_folder=None,
      models_dir="models",
      metrics_dir="metrics",
      verbose_metrics=False,
  ):
      self.db = database
      self.datarun = datarun
      self.save_files = save_files
      self.cloud_mode = cloud_mode
  
      self.aws_access_key = aws_access_key
      self.aws_secret_key = aws_secret_key
      self.s3_bucket = s3_bucket
      self.s3_folder = s3_folder
  
      self.models_dir = models_dir
      self.metrics_dir = metrics_dir
      self.verbose_metrics = verbose_metrics
      ensure_directory(self.models_dir)
      ensure_directory(self.metrics_dir)
  
      # load the Dataset from the database
      self.dataset = self.db.get_dataset(self.datarun.dataset_id)
  
      # load the Selector and Tuner classes specified by our datarun
      self.load_selector()
      self.load_tuner()
  
imports: from __future__ import absolute_import, unicode_literals
  import datetime
  import imp
  import logging
  import os
  import re
  import socket
  import traceback
  import warnings
  from builtins import object, str
  from collections import defaultdict
  import boto3
  import numpy
  from atm.classifier import Model
  from atm.constants import CUSTOM_CLASS_REGEX, SELECTORS, TUNERS
  from atm.database import ClassifierStatus, DBSession
  from atm.utilities import ensure_directory, get_instance, save_metrics, save_model, update_params
label_desc: Use image node_id 1 to create a new Worker object from inherited base classes: object with example: obj = Worker(database, datarun, save_files, cloud_mode, aws_access_key, aws_secret_key, s3_bucket, s3_folder, models_dir, metrics_dir, verbose_metrics)