<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def action_spatial(self, action):
 """Given an Action, return the right spatial action."""

    if self.surf.surf_type & SurfType.FEATURE:
      return action.action_feature_layer
    elif self.surf.surf_type & SurfType.RGB:
      return action.action_render
    else:
      assert self.surf.surf_type & (SurfType.RGB | SurfType.FEATURE)