code: def get_dimension_type(self, dim):
          
          dim_obj = self.get_dimension(dim)
          if dim_obj and dim_obj.type is not None:
              return dim_obj.type
          dim_vals = [type(v) for v in self.dimension_values(dim)]
          if len(set(dim_vals)) == 1:
              return dim_vals[0]
          else:
              return None
docs: Get the type of the requested dimension.
  
          Type is determined by Dimension.type attribute or common
          type of the dimension values, otherwise None.
  
          Args:
              dimension: Dimension to look up by name or by index
  
          Returns:
              Declared type of values along the dimension