code: def test_one_hot():
      r = utils.one_hot(4, 6)
      assert (r[[0, 1, 2, 3, 5]] == 0).all()
      assert r[4] == 1
  
imports: import os
  from decimal import Decimal
  from typing import Optional, Text, Union, Any
  from pathlib import Path
  import pytest
  import rasa.core.lock_store
  import rasa.utils.io
  from rasa.constants import ENV_SANIC_WORKERS
  from rasa.core import utils
  from rasa.core.lock_store import LockStore, RedisLockStore, InMemoryLockStore
  from rasa.core.policies.policy import PolicyPrediction
  from rasa.shared.core.domain import Domain
  from rasa.utils.endpoints import EndpointConfig
  from tests.conftest import write_endpoint_config_to_yaml
label_desc: Use image node_id 1 for calling a global function with example usage: test_one_hot() without return types