# Buggy code
def get_worker_status(self, node_names):
    playbook = "deploy/ansible/worker/get_workers_status.yml"

    self.generate_ansible_inventory(node_names)

    loader = DataLoader()
    inventory = InventoryManager(loader=loader, sources=self.inventory_path)
    callback = AnsiblePlayBookResultsCollector(
        sock=self.emitter,
        return_results=self.output_capture,
        filter_output=["Print Ursula Status Data", "Print Last Log Line"],
    )
    variable_manager = VariableManager(loader=loader, inventory=inventory)

    executor = PlaybookExecutor(
        playbooks=[playbook],
        inventory=inventory,
        variable_manager=variable_manager,
        loader=loader,
        passwords=dict(),
    )
    executor._tqm._stdout_callback = callback
    executor.run()
    self.update_captured_instance_data(self.output_capture)

    self.give_helpful_hints(node_names, playbook=playbook)


# Traceback (TypeError)
Traceback (most recent call last):
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/bin/nucypher", line 33, in <module>
sys.exit(load_entry_point('nucypher', 'console_scripts', 'nucypher')())
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/k/.local/share/virtualenvs/nucypher-iNjwDRsw/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/k/Git/nucypher/nucypher/cli/options.py", line 167, in wrapper
return func(**kwargs)
File "/home/k/Git/nucypher/nucypher/cli/options.py", line 167, in wrapper
return func(**kwargs)
File "/home/k/Git/nucypher/nucypher/cli/options.py", line 167, in wrapper
return func(**kwargs)
TypeError: add_for_stake() got an unexpected keyword argument 'config_file'

# Fixed code
def get_worker_status(self, node_names):
    playbook = Path(DEPLOY_DIR).joinpath("ansible/worker/get_workers_status.yml")

    self.update_generate_inventory(node_names)

    loader = DataLoader()
    inventory = InventoryManager(loader=loader, sources=self.inventory_path)
    callback = AnsiblePlayBookResultsCollector(
        sock=self.emitter,
        return_results=self.output_capture,
        filter_output=["Print Ursula Status Data", "Print Last Log Line"],
    )
    variable_manager = VariableManager(loader=loader, inventory=inventory)

    executor = PlaybookExecutor(
        playbooks=[playbook],
        inventory=inventory,
        variable_manager=variable_manager,
        loader=loader,
        passwords=dict(),
    )
    executor._tqm._stdout_callback = callback
    executor.run()
    self.update_captured_instance_data(self.output_capture)

    self.give_helpful_hints(node_names, playbook=playbook)