code: def _safe_type(value):
      
  
      if type(value) is str: dtype = 'string'
      if type(value) is unicode: dtype = 'string'
      if type(value) is int: dtype = 'integer'
      if type(value) is float: dtype = 'real'
  
      return dtype
docs: Converts Python type names to XGMML-safe type names.