code: def test_unsupported_mha_configs(
      head_size: int, n_heads: int, n_shards: int
  ):
      """
      Sharding should fail if there are fewer heads than shards.
  
      TODO(cmikeh2): Look to support this configuration.
      """
      param = fill_with_head_ids(head_size, n_heads)
  
      for shard_rank in range(n_shards):
          with pytest.raises(ValueError):
              shard_qkv_param(
                  param,
                  shard_rank,
                  n_shards,
                  head_size,
                  n_heads,
                  n_heads,
              )
  
file_path: deepspeed/tests/unit/inference/v2/model_implementations/sharding/test_qkv_sharding.py
imports: from typing import Optional
  import pytest
  import torch
  from deepspeed.accelerator import get_accelerator
  from deepspeed.inference.v2.model_implementations.sharding import *
label_desc: Use image node_id 7 for calling a global function with example usage: test_unsupported_mha_configs(head_size, n_heads, n_shards) without return types