code: def test_rotate(self):
      ls = load_wkt("LINESTRING(240 400, 240 300, 300 300)")
      # counter-clockwise degrees
      rls = affinity.rotate(ls, 90)
      els = load_wkt("LINESTRING(220 320, 320 320, 320 380)")
      assert rls.equals(els)
      # retest with named parameters for the same result
      rls = affinity.rotate(geom=ls, angle=90, origin="center")
      assert rls.equals(els)
      # clockwise radians
      rls = affinity.rotate(ls, -pi / 2, use_radians=True)
      els = load_wkt("LINESTRING(320 380, 220 380, 220 320)")
      assert rls.equals(els)
      ## other `origin` parameters
      # around the centroid
      rls = affinity.rotate(ls, 90, origin="centroid")
      els = load_wkt("LINESTRING(182.5 320, 282.5 320, 282.5 380)")
      assert rls.equals(els)
      # around the second coordinate tuple
      rls = affinity.rotate(ls, 90, origin=ls.coords[1])
      els = load_wkt("LINESTRING(140 300, 240 300, 240 360)")
      assert rls.equals(els)
      # around the absolute Point of origin
      rls = affinity.rotate(ls, 90, origin=Point(0, 0))
      els = load_wkt("LINESTRING(-400 240, -300 240, -300 300)")
      assert rls.equals(els)
  
imports: import unittest
  from math import pi
  import numpy
  import pytest
  from shapely import affinity
  from shapely.geometry import Point
  from shapely.wkt import loads
label_desc: Use image node_id 1 for calling the TransformOpsTestCase obj's underlying member method code with example usage: obj.test_rotate() without return types