code: def orient(polygon, sign=1.0):
      s = float(sign)
      rings = []
      ring = polygon.exterior
      if signed_area(ring) / s >= 0.0:
          rings.append(ring)
      else:
          rings.append(list(ring.coords)[::-1])
      for ring in polygon.interiors:
          if signed_area(ring) / s <= 0.0:
              rings.append(ring)
          else:
              rings.append(list(ring.coords)[::-1])
      return Polygon(rings[0], rings[1:])
  
imports: import numpy
  import shapely
  from shapely.algorithms.cga import is_ccw_impl, signed_area
  from shapely.errors import TopologicalError
  from shapely.geometry.base import BaseGeometry
  from shapely.geometry.linestring import LineString
  from shapely.geometry.point import Point
label_desc: Use image node_id 2 for calling a global function with example usage: orient(polygon, sign) and returns: Polygon