parameters: (self, export_scope=None)
docstring: Converts a `WhileContext` to a `WhileContextDef` protocol buffer.
  
      Args:
        export_scope: Optional `string`. Name scope to remove.
  
      Returns:
        A `WhileContextDef` protocol buffer.
docstring_summary: Converts a `WhileContext` to a `WhileContextDef` protocol buffer.
docstring_tokens: Converts a WhileContext to a WhileContextDef protocol buffer .
function: def to_proto(self, export_scope=None):
      """Converts a `WhileContext` to a `WhileContextDef` protocol buffer.
  
      Args:
        export_scope: Optional `string`. Name scope to remove.
  
      Returns:
        A `WhileContextDef` protocol buffer.
      """
      if (export_scope is None or
          self.name.startswith(export_scope)):
        context_def = control_flow_pb2.WhileContextDef()
        context_def.context_name = ops.strip_name_scope(
            self.name, export_scope)
        context_def.parallel_iterations = self._parallel_iterations
        context_def.back_prop = self._back_prop
        context_def.swap_memory = self._swap_memory
        context_def.pivot_for_pred_name = ops.strip_name_scope(
            self._pivot_for_pred.name, export_scope)
        context_def.pivot_for_body_name = ops.strip_name_scope(
            self._pivot_for_body.name, export_scope)
        context_def.pivot_name = ops.strip_name_scope(
            self._pivot.name, export_scope)
        context_def.loop_exit_names.extend(
            [ops.strip_name_scope(l.name, export_scope)
             for l in self._loop_exits])
        context_def.loop_enter_names.extend(
            [ops.strip_name_scope(l.name, export_scope)
             for l in self._loop_enters])
        context_def.values_def.MergeFrom(
            super(WhileContext, self)._to_proto(
                export_scope=export_scope))
  
        return context_def
      else:
        return None
function_tokens: def to_proto ( self , export_scope = None ) : if ( export_scope is None or self . name . startswith ( export_scope ) ) : context_def = control_flow_pb2 . WhileContextDef ( ) context_def . context_name = ops . strip_name_scope ( self . name , export_scope ) context_def . parallel_iterations = self . _parallel_iterations context_def . back_prop = self . _back_prop context_def . swap_memory = self . _swap_memory context_def . pivot_for_pred_name = ops . strip_name_scope ( self . _pivot_for_pred . name , export_scope ) context_def . pivot_for_body_name = ops . strip_name_scope ( self . _pivot_for_body . name , export_scope ) context_def . pivot_name = ops . strip_name_scope ( self . _pivot . name , export_scope ) context_def . loop_exit_names . extend ( [ ops . strip_name_scope ( l . name , export_scope ) for l in self . _loop_exits ] ) context_def . loop_enter_names . extend ( [ ops . strip_name_scope ( l . name , export_scope ) for l in self . _loop_enters ] ) context_def . values_def . MergeFrom ( super ( WhileContext , self ) . _to_proto ( export_scope = export_scope ) ) return context_def else : return None