I don't see a strightforward way of doing this in ArcPy normal licensing without re-inventing wheels..
Just read about Shapely
(download link),a python package, which includes the "polygonize"
function from familiar JTS/GEOS suites..
My idea is that we can import the Shapely package in ArcPy and get the WKT of the ESRI polyline geometries and pass them to the polygonizer. This will give the resulting polygons. These could be converted back to ESRI polyline geometries. Although i should say, my Python knowledge is terrible..this is just a generic idea..
here is a sample of polygonizer..
>>> from shapely.geometry import LineString, Point
>>> from shapely.ops import polygonize
>>> lines = [
... LineString(((0, 0), (1, 1))),
... LineString(((0, 0), (0, 1))),
... LineString(((0, 1), (1, 1))),
... LineString(((1, 1), (1, 0))),
... LineString(((1, 0), (0, 0))),
... LineString(((5, 5), (6, 6))),
... Point(0, 0),
... ]
>>> result = polygonize(lines)
>>> list(result)
[<shapely.geometry.polygon.Polygon object at ...>, <shapely.geometry.polygon.Polygon object at ...>]
>>> lines2 = [
... ((0, 0), (1, 1)),
... ((0, 0), (0, 1)),
... ((0, 1), (1, 1)),
... ((1, 1), (1, 0)),
... ((1, 0), (0, 0)),
... ((5, 5), (6, 6)),
... ]
>>> result2 = polygonize(lines2)
>>> list(result2)
[<shapely.geometry.polygon.Polygon object at ...>, <shapely.geometry.polygon.Polygon object at ...>]
Also i am not sure what we can do with the LEFT_ID and RIGHT_ID. I think these are irrelevant. Update me if i am wrong.