code: def test_electrocardiogram(self):
      # Test shape, dtype and stats of signal
      ecg = electrocardiogram()
      assert_equal(ecg.dtype, float)
      assert_equal(ecg.shape, (108000,))
      assert_almost_equal(ecg.mean(), -0.16510875)
      assert_almost_equal(ecg.std(), 0.5992473991177294)
  
      # hash check
      assert _has_hash(
          os.path.join(data_dir, "ecg.dat"), registry["ecg.dat"]
      )
  
file_path: scipy/scipy/datasets/tests/test_data.py
imports: from scipy.datasets._registry import registry
  from scipy.datasets._fetchers import data_fetcher
  from scipy.datasets._utils import _clear_cache
  from scipy.datasets import ascent, face, electrocardiogram, download_all
  from numpy.testing import assert_equal, assert_almost_equal
  import os
  import pytest
label_desc: Use image node_id 5 for calling the TestDatasets obj's underlying member method code with example usage: obj.test_electrocardiogram() without return types