code: def test_attrs_with_repr():
      """Check that if __repr__ or __hash__ is defined, attrs does not override
      them (there is a special logic for it in @attrs).
      """
  
      @attrs
      class WithRepr(object):
          def __init__(self, x):
              self.x = x
  
          def __repr__(self):
              return "foo"
  
          def __hash__(self):
              return 1
  
      assert WithRepr(1) == WithRepr(1) != WithRepr(2)
      assert repr(WithRepr(2)) == "foo"
      assert hash(WithRepr(2)) == 1
  
imports: import attr
  import pytest
  from eli5.base_utils import attrs
label_desc: Use image node_id 3 for calling a global function with example usage: test_attrs_with_repr() and returns: str, int