parameters: (ctxt)
return_statement: return None
docstring: Returns the first ancestor XLAContext of `ctxt`.
  
    Returns `ctxt` if `ctxt` is a XLAContext, or None if `ctxt` is not in a
    while loop.
  
    Args:
      ctxt: ControlFlowContext
  
    Returns:
      `ctxt` if `ctxt` is a XLAContext, the most nested XLAContext containing
      `ctxt`, or None if `ctxt` is not in a while loop.
docstring_summary: Returns the first ancestor XLAContext of `ctxt`.
docstring_tokens: Returns the first ancestor XLAContext of ctxt .
function: def GetContainingXLAContext(ctxt):
    """Returns the first ancestor XLAContext of `ctxt`.
  
    Returns `ctxt` if `ctxt` is a XLAContext, or None if `ctxt` is not in a
    while loop.
  
    Args:
      ctxt: ControlFlowContext
  
    Returns:
      `ctxt` if `ctxt` is a XLAContext, the most nested XLAContext containing
      `ctxt`, or None if `ctxt` is not in a while loop.
    """
    while ctxt:
      if ctxt.IsXLAContext(): return ctxt
      ctxt = ctxt.outer_context
    return None
function_tokens: def GetContainingXLAContext ( ctxt ) : while ctxt : if ctxt . IsXLAContext ( ) : return ctxt ctxt = ctxt . outer_context return None