def METHOD_NAME():
    '''Test the from_string method.'''
    assert AccessType.from_string("read") == AccessType.READ
    assert AccessType.from_string("write") == AccessType.WRITE
    assert AccessType.from_string("readwrite") == AccessType.READWRITE
    assert AccessType.from_string("inc") == AccessType.INC
    assert AccessType.from_string("readinc") == AccessType.READINC
    assert AccessType.from_string("sum") == AccessType.SUM
    assert AccessType.from_string("unknown") == AccessType.UNKNOWN
    with pytest.raises(ValueError) as err:
        AccessType.from_string("invalid")
    valid = [str(access).lower() for access in AccessType]
    assert (f"Unknown access type 'invalid'. Valid values are {valid}."
            in str(err.value))