<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_spatial_type(spatial_model):
 """Translate a spatial model string to a spatial type."""


    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