code: def test_scale(self):
      ls = load_wkt("LINESTRING(240 400 10, 240 300 30, 300 300 20)")
      # test defaults of 1.0
      sls = affinity.scale(ls)
      assert sls.equals(ls)
      # different scaling in different dimensions
      sls = affinity.scale(ls, 2, 3, 0.5)
      els = load_wkt("LINESTRING(210 500 5, 210 200 15, 330 200 10)")
      assert sls.equals(els)
      # Do explicit 3D check of coordinate values
      for a, b in zip(sls.coords, els.coords):
          for ap, bp in zip(a, b):
              self.assertEqual(ap, bp)
      # retest with named parameters for the same result
      sls = affinity.scale(
          geom=ls, xfact=2, yfact=3, zfact=0.5, origin="center"
      )
      assert sls.equals(els)
      ## other `origin` parameters
      # around the centroid
      sls = affinity.scale(ls, 2, 3, 0.5, origin="centroid")
      els = load_wkt(
          "LINESTRING(228.75 537.5, 228.75 237.5, 348.75 237.5)"
      )
      assert sls.equals(els)
      # around the second coordinate tuple
      sls = affinity.scale(ls, 2, 3, 0.5, origin=ls.coords[1])
      els = load_wkt("LINESTRING(240 600, 240 300, 360 300)")
      assert sls.equals(els)
      # around some other 3D Point of origin
      sls = affinity.scale(ls, 2, 3, 0.5, origin=Point(100, 200, 1000))
      els = load_wkt(
          "LINESTRING(380 800 505, 380 500 515, 500 500 510)"
      )
      assert sls.equals(els)
      # Do explicit 3D check of coordinate values
      for a, b in zip(sls.coords, els.coords):
          for ap, bp in zip(a, b):
              assert ap == bp
  
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 4 for calling the TransformOpsTestCase obj's underlying member method code with example usage: obj.test_scale() without return types