class_docstr: Utility that supports re-dimensioning any HoloViews object via the
  redim method.
class_docstr_tok: ["Utility","that","supports","re-dimensioning","any","HoloViews","object","via","the","redim","method","."]
code: def _transform_dimension(self, kdims, vdims, dimension):
      if dimension in kdims:
          idx = kdims.index(dimension)
          dimension = self._obj.kdims[idx]
      elif dimension in vdims:
          idx = vdims.index(dimension)
          dimension = self._obj.vdims[idx]
      return dimension
  
imports: import copy
  import sys
  from functools import wraps
  from types import FunctionType
  import param
  from .None import util
  from .pprint import PrettyPrinter
label_desc: Use image node_id 5 for calling the Redim obj's underlying member method code with example usage: obj._transform_dimension(kdims, vdims, dimension) and returns: dimension