code: def get_spatial_type(spatial_model):
      
  
      if spatial_model in ['SkyDirFunction', 'PointSource',
                           'Gaussian']:
          return 'SkyDirFunction'
      elif spatial_model in ['SpatialMap']:
          return 'SpatialMap'
      elif spatial_model in ['RadialGaussian', 'RadialDisk']:
          try:
              import pyLikelihood
              if hasattr(pyLikelihood, 'RadialGaussian'):
                  return spatial_model
              else:
                  return 'SpatialMap'
          except Exception:
              return spatial_model
      else:
          return spatial_model
docs: Translate a spatial model string to a spatial type.