parameters: (spec, environment=None)
return_statement: return net.funcall
docstring: Evaluates a spec and returns the binding of `net`.
  
    Specs are written in a DSL based on function composition.  A spec
    like `net = Cr(64, [3, 3])` assigns an object that represents a
    single argument function capable of creating a network to
    the variable `net`.
  
    Args:
        spec: specification as a string, ending with a `net = ...` statement
        environment: a dictionary of input bindings
  
    Returns:
        A callable that instantiates the `net` binding.
  
    Raises:
        ValueError: spec failed to create a `net`
        Exception: other exceptions raised during execution of `spec`
docstring_summary: Evaluates a spec and returns the binding of `net`.
docstring_tokens: Evaluates a spec and returns the binding of net .
function: def create_net_fun(spec, environment=None):
    """Evaluates a spec and returns the binding of `net`.
  
    Specs are written in a DSL based on function composition.  A spec
    like `net = Cr(64, [3, 3])` assigns an object that represents a
    single argument function capable of creating a network to
    the variable `net`.
  
    Args:
        spec: specification as a string, ending with a `net = ...` statement
        environment: a dictionary of input bindings
  
    Returns:
        A callable that instantiates the `net` binding.
  
    Raises:
        ValueError: spec failed to create a `net`
        Exception: other exceptions raised during execution of `spec`
  
    """
    bindings = eval_spec(spec, environment)
    net = bindings.get("net", None)
    if net is None:
      raise ValueError("spec failed to create 'net': %s" % (spec,))
    return net.funcall
function_tokens: def create_net_fun ( spec , environment = None ) : bindings = eval_spec ( spec , environment ) net = bindings . get ( "net" , None ) if net is None : raise ValueError ( "spec failed to create 'net': %s" % ( spec , ) ) return net . funcall