parameters: (op_type, name, device=None, attrs=None)
return_statement: return node_def
docstring: Create a NodeDef proto.
  
    Args:
      op_type: Value for the "op" attribute of the NodeDef proto.
      name: Value for the "name" attribute of the NodeDef proto.
      device: string, device, or function from NodeDef to string.
        Value for the "device" attribute of the NodeDef proto.
      attrs: Optional dictionary where the key is the attribute name (a string)
        and the value is the respective "attr" attribute of the NodeDef proto (an
        AttrValue).
  
    Returns:
      A node_def_pb2.NodeDef protocol buffer.
docstring_summary: Create a NodeDef proto.
docstring_tokens: Create a NodeDef proto .
function: def _NodeDef(op_type, name, device=None, attrs=None):  # pylint: disable=redefined-outer-name
    """Create a NodeDef proto.
  
    Args:
      op_type: Value for the "op" attribute of the NodeDef proto.
      name: Value for the "name" attribute of the NodeDef proto.
      device: string, device, or function from NodeDef to string.
        Value for the "device" attribute of the NodeDef proto.
      attrs: Optional dictionary where the key is the attribute name (a string)
        and the value is the respective "attr" attribute of the NodeDef proto (an
        AttrValue).
  
    Returns:
      A node_def_pb2.NodeDef protocol buffer.
    """
    node_def = node_def_pb2.NodeDef()
    node_def.op = compat.as_bytes(op_type)
    node_def.name = compat.as_bytes(name)
    if attrs is not None:
      for k, v in six.iteritems(attrs):
        node_def.attr[k].CopyFrom(v)
    if device is not None:
      if callable(device):
        node_def.device = device(node_def)
      else:
        node_def.device = _device_string(device)
    return node_def
function_tokens: def _NodeDef ( op_type , name , device = None , attrs = None ) : # pylint: disable=redefined-outer-name node_def = node_def_pb2 . NodeDef ( ) node_def . op = compat . as_bytes ( op_type ) node_def . name = compat . as_bytes ( name ) if attrs is not None : for k , v in six . iteritems ( attrs ) : node_def . attr [ k ] . CopyFrom ( v ) if device is not None : if callable ( device ) : node_def . device = device ( node_def ) else : node_def . device = _device_string ( device ) return node_def