parameters: (meta_graph_def_to_load)
return_statement: return legacy_init_op_tensor
docstring: Gets the legacy init op tensor, if one exists.
  
    Args:
      meta_graph_def_to_load: The meta graph def from the SavedModel to be loaded.
  
    Returns:
      The legacy init op tensor, if it exists and `None` otherwise.
  
    Raises:
      RuntimeError: If the collection def corresponding to the legacy init op key
          has other than exactly one tensor.
docstring_summary: Gets the legacy init op tensor, if one exists.
docstring_tokens: Gets the legacy init op tensor if one exists .
function: def _get_legacy_init_op_tensor(meta_graph_def_to_load):
    """Gets the legacy init op tensor, if one exists.
  
    Args:
      meta_graph_def_to_load: The meta graph def from the SavedModel to be loaded.
  
    Returns:
      The legacy init op tensor, if it exists and `None` otherwise.
  
    Raises:
      RuntimeError: If the collection def corresponding to the legacy init op key
          has other than exactly one tensor.
    """
    collection_def = meta_graph_def_to_load.collection_def
    legacy_init_op_tensor = None
    if constants.LEGACY_INIT_OP_KEY in collection_def:
      legacy_init_ops = collection_def[
          constants.LEGACY_INIT_OP_KEY].node_list.value
      if len(legacy_init_ops) != 1:
        raise RuntimeError("Expected exactly one legacy serving init op.")
      legacy_init_op_tensor = ops.get_collection(constants.LEGACY_INIT_OP_KEY)[0]
    return legacy_init_op_tensor
function_tokens: def _get_legacy_init_op_tensor ( meta_graph_def_to_load ) : collection_def = meta_graph_def_to_load . collection_def legacy_init_op_tensor = None if constants . LEGACY_INIT_OP_KEY in collection_def : legacy_init_ops = collection_def [ constants . LEGACY_INIT_OP_KEY ] . node_list . value if len ( legacy_init_ops ) != 1 : raise RuntimeError ( "Expected exactly one legacy serving init op." ) legacy_init_op_tensor = ops . get_collection ( constants . LEGACY_INIT_OP_KEY ) [ 0 ] return legacy_init_op_tensor