def METHOD_NAME(proto):
    state_map = {
        IPDesc.FREE: ip_descriptor.IPState.FREE,
        IPDesc.ALLOCATED: ip_descriptor.IPState.ALLOCATED,
        IPDesc.RELEASED: ip_descriptor.IPState.RELEASED,
        IPDesc.REAPED: ip_descriptor.IPState.REAPED,
        IPDesc.RESERVED: ip_descriptor.IPState.RESERVED,
    }
    state = state_map[proto]
    return state