class_docstr: A pure Python class related to affine based coordinate transformations.
code: def _transform(self, xs, ys, zs, transform_direction):
      if transform_direction is TransformDirection.forward:
          transform = self._transformer
      elif transform_direction is TransformDirection.reverse:
          transform = ~self._transformer
  
      is_arr = True if type(xs) in [list, tuple] else False
      if is_arr:
          a, b, c, d, e, f, _, _, _ = transform
          transform_matrix = np.array([[a, b, c], [d, e, f]])
          input_matrix = np.array([xs, ys, np.ones(len(xs))])
          output_matrix = np.dot(transform_matrix, input_matrix)
          return (list(output_matrix[0]), list(output_matrix[1]))
      else:
          return transform * (xs, ys)
  
imports: from contextlib import ExitStack
  from functools import partial
  import math
  import numpy
  import warnings
  from affine import Affine
  from rasterio.env import env_ctx_if_needed
  from rasterio._transform import _transform_from_gcps, RPCTransformerBase, GCPTransformerBase
  from rasterio.enums import TransformDirection, TransformMethod
  from rasterio.control import GroundControlPoint
  from rasterio.rpc import RPC
  from rasterio.errors import TransformError, RasterioDeprecationWarning
label_desc: Use image node_id 2 for calling the AffineTransformer obj's underlying member method code with example usage: obj._transform(xs, ys, zs, transform_direction) and returns: list,  list, unknown