code: def test_worker_started_with_required_arguments(
      self, mock_celery_app, mock_popen, mock_locations
  ):
      pid_file = "pid_file"
      mock_locations.return_value = (pid_file, None, None, None)
      concurrency = "1"
      celery_hostname = "celery_hostname"
      queues = "queue"
      autoscale = "2,5"
      args = self.parser.parse_args(
          [
              "celery",
              "worker",
              "--autoscale",
              autoscale,
              "--concurrency",
              concurrency,
              "--celery-hostname",
              celery_hostname,
              "--queues",
              queues,
              "--without-mingle",
              "--without-gossip",
          ]
      )
  
      celery_command.worker(args)
  
      mock_celery_app.worker_main.assert_called_once_with(
          [
              "worker",
              "-O",
              "fair",
              "--queues",
              queues,
              "--concurrency",
              int(concurrency),
              "--hostname",
              celery_hostname,
              "--loglevel",
              conf.get("logging", "CELERY_LOGGING_LEVEL"),
              "--pidfile",
              pid_file,
              "--autoscale",
              autoscale,
              "--without-mingle",
              "--without-gossip",
              "--pool",
              "prefork",
          ]
      )
  
imports: from __future__ import annotations
  import importlib
  import os
  from argparse import Namespace
  from unittest import mock
  import pytest
  import sqlalchemy
  import airflow
  from airflow.cli import cli_parser
  from airflow.cli.commands import celery_command
  from airflow.configuration import conf
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 2 for calling the TestWorkerStart obj's underlying member method code with example usage: obj.test_worker_started_with_required_arguments(mock_celery_app, mock_popen, mock_locations) without return types