code: def add_dimension(cls, dataset, dimension, dim_pos, values, vdim):
      data = dataset.data.copy()
      geom_col = cls.geo_column(dataset.data)
      if dim_pos >= list(data.columns).index(geom_col):
          dim_pos -= 1
      if dimension.name not in data:
          data.insert(dim_pos, dimension.name, values)
      return data
  
imports: import sys
  from collections import defaultdict
  import numpy
  import pandas
  from ..dimension import dimension_name
  from ..util import isscalar, unique_array, unique_iterator
  from .interface import DataError, Interface
  from .multipath import MultiInterface, ensure_ring
  from .pandas import PandasInterface
label_desc: Use image node_id 28 for calling the SpatialPandasInterface obj's underlying member method code with example usage: obj.add_dimension(cls, dataset, dimension, dim_pos, values, vdim) and returns: data