code: def _check_index_in_compilations(context: BaseContext, index: str):
      
      compilations = 'compilations'
      if compilations not in context.shared_data:
          return False
      return index in context.shared_data[compilations]
docs: Store compilation flag at specified index in context's shared data.