def test_int_str_dim():

    @typeguard.typechecked
    def _a_dim_checker1(x: TensorType['a':3]):
        pass

    @typeguard.typechecked
    def _a_dim_checker2(x: TensorType['a':(- 1)]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker1(x: TensorType['a':3, 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker2(x: TensorType['a':3, 'b':(- 1)]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker3(x: TensorType['a':(- 1), 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker4(x: TensorType['a':3, 'b']):
        pass

    @typeguard.typechecked
    def _ab_dim_checker5(x: TensorType['a', 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker6(x: TensorType['a':5, 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker7(x: TensorType['a':5, 'b':(- 1)]):
        pass

    @typeguard.typechecked
    def _m1b_dim_checker(x: TensorType[(- 1), 'b':4]):
        pass

    @typeguard.typechecked
    def _abm1_dim_checker(x: TensorType['a':3, 'b':4, (- 1)]):
        pass

    @typeguard.typechecked
    def _m1bm1_dim_checker(x: TensorType[(- 1), 'b':4, (- 1)]):
        pass
    x = torch.rand(3, 4)
    _ab_dim_checker1(x)
    _ab_dim_checker2(x)
    _ab_dim_checker3(x)
    _ab_dim_checker4(x)
    _ab_dim_checker5(x)
    _m1b_dim_checker(x)
    with pytest.raises(TypeError):
        _a_dim_checker1(x)
    with pytest.raises(TypeError):
        _a_dim_checker2(x)
    with pytest.raises(TypeError):
        _ab_dim_checker6(x)
    with pytest.raises(TypeError):
        _ab_dim_checker7(x)
    with pytest.raises(TypeError):
        _abm1_dim_checker(x)
    with pytest.raises(TypeError):
        _m1bm1_dim_checker(x)
def test_int_str_dim():

    @typeguard.typechecked
    def _a_dim_checker1(x: TensorType['a':3]):
        pass

    @typeguard.typechecked
    def _a_dim_checker2(x: TensorType['a':(- 1)]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker1(x: TensorType['a':3, 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker2(x: TensorType['a':3, 'b':(- 1)]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker3(x: TensorType['a':(- 1), 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker4(x: TensorType['a':3, 'b']):
        pass

    @typeguard.typechecked
    def _ab_dim_checker5(x: TensorType['a', 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker6(x: TensorType['a':5, 'b':4]):
        pass

    @typeguard.typechecked
    def _ab_dim_checker7(x: TensorType['a':5, 'b':(- 1)]):
        pass

    @typeguard.typechecked
    def _m1b_dim_checker(x: TensorType[(- 1), 'b':4]):
        pass

    @typeguard.typechecked
    def _abm1_dim_checker(x: TensorType['a':3, 'b':4, (- 1)]):
        pass

    @typeguard.typechecked
    def _m1bm1_dim_checker(x: TensorType[(- 1), 'b':4, (- 1)]):
        pass
    x = torch.rand(3, 4)
    _ab_dim_checker1(x)
    _ab_dim_checker2(x)
    _ab_dim_checker3(x)
    _ab_dim_checker4(x)
    _ab_dim_checker5(x)
    _m1b_dim_checker(x)
    with pytest.raises(TypeError):
        _a_dim_checker1(x)
    with pytest.raises(TypeError):
        _a_dim_checker2(x)
    with pytest.raises(TypeError):
        _ab_dim_checker6(x)
    with pytest.raises(TypeError):
        _ab_dim_checker7(x)
    with pytest.raises(TypeError):
        _abm1_dim_checker(x)
    with pytest.raises(TypeError):
        _m1bm1_dim_checker(x)