def create_pool_state(state: PoolSingletonState, target_puzzle_hash: bytes32, owner_pubkey: G1Element, pool_url: Optional[str], relative_lock_height: uint32) -> PoolState:
    if (state not in set((s.value for s in PoolSingletonState))):
        raise AssertionError('state {state} is not a valid PoolSingletonState,')
    ps = PoolState(POOL_PROTOCOL_VERSION, uint8(state), target_puzzle_hash, owner_pubkey, pool_url, relative_lock_height)
    return ps
def create_pool_state(state: PoolSingletonState, target_puzzle_hash: bytes32, owner_pubkey: G1Element, pool_url: Optional[str], relative_lock_height: uint32) -> PoolState:
    if (state not in set((s.value for s in PoolSingletonState))):
        raise AssertionError('state {state} is not a valid PoolSingletonState,')
    ps = PoolState(POOL_PROTOCOL_VERSION, uint8(state), target_puzzle_hash, owner_pubkey, pool_url, relative_lock_height)
    return ps