code: def calculate_inception_score(p_yx):
      p_y = torch.unsqueeze(p_yx.mean(axis=0), 0)
      kl_d = torch.kl_div(torch.log(p_y), p_yx)
  
      sum_kl_d = kl_d.sum(axis=1)
      avg_kl_d = torch.mean(sum_kl_d)
  
      is_score = torch.exp(avg_kl_d)
  
      return is_score
  
file_path: ignite/tests/ignite/metrics/gan/test_inception_score.py
imports: import os
  import pytest
  import torch
  import ignite.distributed
  from ignite.exceptions import NotComputableError
  from ignite.metrics.gan.inception_score import InceptionScore
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_inception_score(p_yx) and returns: is_score