code: def is_head_node_from_resource_usage(usage: Dict[str, float]) -> bool:
      if HEAD_NODE_RESOURCE_NAME in usage:
          return True
      return False
  
file_path: ray/python/ray/autoscaler/v2/tests/test_e2e.py
imports: import os
  import sys
  import time
  from typing import Dict
  import pytest
  import ray
  from ray._private.resource_spec import HEAD_NODE_RESOURCE_NAME
  from ray._private.test_utils import run_string_as_driver_nonblocking, wait_for_condition
  from ray.autoscaler.v2.sdk import get_cluster_status
  from ray.cluster_utils import AutoscalingCluster
  from ray.util.placement_group import placement_group, remove_placement_group
  from ray.util.state.api import list_placement_groups, list_tasks
label_desc: Use image node_id 1 for calling a global function with example usage: is_head_node_from_resource_usage(usage) and returns: False, True