def METHOD_NAME(shapely_conn, fmt_in, fmt_out):
    SAMPLE_POINT = Point(1.2, 3.4)
    SAMPLE_POLYGON = Polygon([(0, 0), (1, 1), (1, 0)])
    with shapely_conn.cursor(binary=fmt_out) as cur:
        cur.execute(
            """
        create table sample_geoms(
            id     INTEGER PRIMARY KEY,
            geom   geometry
        )
        """
        )
        cur.execute(
            f"insert into sample_geoms(id, geom) VALUES(1, %{fmt_in})",
            (SAMPLE_POINT,),
        )
        cur.execute(
            f"insert into sample_geoms(id, geom) VALUES(2, %{fmt_in})",
            (SAMPLE_POLYGON,),
        )
        cur.execute("select geom from sample_geoms where id=1")
        result = cur.fetchone()[0]
        assert result == SAMPLE_POINT
        cur.execute("select geom from sample_geoms where id=2")
        result = cur.fetchone()[0]
        assert result == SAMPLE_POLYGON