def METHOD_NAME(pgconn):
    with pytest.raises(psycopg.OperationalError):
        pgconn.get_copy_data(0)
    pgconn.finish()
    with pytest.raises(psycopg.OperationalError):
        pgconn.get_copy_data(0)