code: def test_statistics():
      train_samples, test_samples = torch.rand(10, 10), torch.rand(
          10, 10
      )
      fid_scorer = FID(
          num_features=10, feature_extractor=torch.nn.Identity()
      )
      fid_scorer.update([train_samples[:5], test_samples[:5]])
      fid_scorer.update([train_samples[5:], test_samples[5:]])
  
      mu1, sigma1 = train_samples.mean(axis=0), torch.tensor(
          cov(train_samples, rowvar=False)
      )
      mu2, sigma2 = test_samples.mean(axis=0), torch.tensor(
          cov(test_samples, rowvar=False)
      )
  
      fid_mu1 = fid_scorer._train_total / fid_scorer._num_examples
      fid_sigma1 = fid_scorer._get_covariance(
          fid_scorer._train_sigma, fid_scorer._train_total
      )
  
      fid_mu2 = fid_scorer._test_total / fid_scorer._num_examples
      fid_sigma2 = fid_scorer._get_covariance(
          fid_scorer._test_sigma, fid_scorer._test_total
      )
  
      assert torch.isclose(mu1.double(), fid_mu1).all()
      for cov1, cov2 in zip(sigma1, fid_sigma1):
          assert torch.isclose(
              cov1.double(), cov2, rtol=1e-04, atol=1e-04
          ).all()
  
      assert torch.isclose(mu2.double(), fid_mu2).all()
      for cov1, cov2 in zip(sigma2, fid_sigma2):
          assert torch.isclose(
              cov1.double(), cov2, rtol=1e-04, atol=1e-04
          ).all()
  
imports: import os
  import re
  from unittest.mock import patch
  import pytest
  import pytorch_fid.fid_score
  import scipy
  import torch
  from numpy import cov
  import ignite.distributed
  from ignite.metrics.gan.fid import FID, fid_score
label_desc: Use image node_id 10 for calling a global function with example usage: test_statistics() without return types