parameters: (c_func)
return_statement: return fdef
docstring: Converts a SWIG-wrapped TF_Function* to a FunctionDef proto.
docstring_summary: Converts a SWIG-wrapped TF_Function* to a FunctionDef proto.
docstring_tokens: Converts a SWIG - wrapped TF_Function * to a FunctionDef proto .
function: def function_def_from_tf_function(c_func):
    """Converts a SWIG-wrapped TF_Function* to a FunctionDef proto."""
    with c_api_util.tf_buffer() as buf:
      c_api.TF_FunctionToFunctionDef(c_func, buf)
      data = c_api.TF_GetBuffer(buf)
    fdef = function_pb2.FunctionDef()
    fdef.ParseFromString(compat.as_bytes(data))
    return fdef
function_tokens: def function_def_from_tf_function ( c_func ) : with c_api_util . tf_buffer ( ) as buf : c_api . TF_FunctionToFunctionDef ( c_func , buf ) data = c_api . TF_GetBuffer ( buf ) fdef = function_pb2 . FunctionDef ( ) fdef . ParseFromString ( compat . as_bytes ( data ) ) return fdef