code: def _update_context_field_expression(present_locations, expression):
      
      no_op_blocks = (ContextField, Literal, LocalField, UnaryTransformation, Variable)
      if isinstance(expression, BinaryComposition):
          if isinstance(expression.left, ContextField) or isinstance(expression.right, ContextField):
              return _update_context_field_binary_composition(present_locations, expression)
          else:
              return _simplify_non_context_field_binary_composition(expression)
      elif isinstance(expression, TernaryConditional):
          return _simplify_ternary_conditional(expression)
      elif isinstance(expression, BetweenClause):
          lower_bound = expression.lower_bound
          upper_bound = expression.upper_bound
          if isinstance(lower_bound, ContextField) or isinstance(upper_bound, ContextField):
              raise AssertionError(u'Found BetweenClause with ContextFields as lower/upper bounds. '
                                   u'This should never happen: {}'.format(expression))
          return expression
      elif isinstance(expression, (OutputContextField, FoldedContextField)):
          raise AssertionError(u'Found unexpected expression of type {}. This should never happen: '
                               u'{}'.format(type(expression).__name__, expression))
      elif isinstance(expression, no_op_blocks):
          return expression
  
      raise AssertionError(u'Found unhandled expression of type {}. This should never happen: '
                           u'{}'.format(type(expression).__name__, expression))
docs: Lower Expressions involving non-existent ContextFields to TrueLiteral and simplify result.