code: def test_hamming(str1, str2, exp):
      obs = edits.hamming(str1, str2)
      assert isinstance(obs, float)
      assert 0.0 <= obs <= 1.0
      assert obs == pytest.approx(exp, rel=0.01)
  
imports: import pytest
  from textacy.similarity import edits
label_desc: Use image node_id 1 for calling a global function with example usage: test_hamming(str1, str2, exp) without return types