<jupyter_start><jupyter_text>echo_data<jupyter_code>from nornir.plugins.tasks.data import echo_data

print(echo_data.__doc__)<jupyter_output>Dummy task that echoes the data passed to it. Useful in grouped_tasks
    to debug data passed to tasks.

    Arguments:
        ``**kwargs``: Any <key,value> pair you want

    Returns:
        Result object with the following attributes set:
          * result (``dict``): ``**kwargs`` passed to the task<jupyter_text>Example<jupyter_code>from nornir import InitNornir
from nornir.plugins.tasks.data import echo_data
from nornir.plugins.functions.text import print_result

nr = InitNornir(
    inventory={
        "options": {
            "host_file": "echo_data/inventory/hosts.yaml",
            "group_file": "echo_data/inventory/groups.yaml"
        }
    }
)

def grouped_task(task):
    task.run(task=echo_data,
             name=task.host.name,
             diet=task.host["diet"],
             famous_members=task.host["additional_data"]["famous_members"],
             more_data="whatever you want",
             even_complex={"a": 1, "b": 2, "c": "asd"})
    
r = nr.run(task=grouped_task)
print_result(r)<jupyter_output>[1m[36mgrouped_task********************************************************************[0m
[0m[1m[34m* bat ** changed : False *******************************************************[0m
[0m[1m[32mvvvv grouped_task ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO[0m
[0m[1m[32m---- bat ** changed : False ---------------------------------------------------- INFO[0m
[0m{[0m [0m'diet'[0m: [0m'carnivore'[0m,
  [0m'even_complex'[0m: [0m{'a': 1, 'b': 2, 'c': 'asd'}[0m,
  [0m'famous_members'[0m: [0m['batman', 'count chocula', 'nosferatu'][0m,
  [0m'more_data'[0m: [0m'whatever you want'[0m}[0m
[0m[1m[32m^^^^ END grouped_task ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m
[0m[1m[34m* canary ** changed : False ****************************************************[0m
[0m[1m[32mvvvv grouped_task ** changed : False vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv INFO[0m
[0m[1m[32m---- canary ** changed : False --------------[...]
{'fraction_non_alphanumeric': 0.28453418999541075, 'fraction_numerical': 0.02799449288664525, 'mean_word_length': 4.093457943925234, 'pattern_counts': {'":': 6, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '42079', 'license': 'Apache-2.0', 'n_tokens_mistral': 832, 'n_tokens_neox': 753, 'n_words': 126, 'path': 'docs/plugins/tasks/data/echo_data.ipynb', 'repo_name': 'lykinsbd/nornir', 'size': '2179'}