code: func (n *Network) EnsureItExists(ctx context.Context) error {
  	networkResource, err := n.Inspect(ctx)
  	if n.external {
  		if client.IsErrNotFound(err) {
  			// FIXME(vdemeester) introduce some libcompose error type
  			return fmt.Errorf("Network %s declared as external, but could not be found. Please create the network manually using docker network create %s and try again", n.fullName(), n.fullName())
  		}
  		return err
  	}
  	if err != nil && client.IsErrNotFound(err) {
  		return n.create(ctx)
  	}
  	if n.driver != "" && networkResource.Driver != n.driver {
  		return fmt.Errorf("Network %q needs to be recreated - driver has changed", n.fullName())
  	}
  	if len(n.driverOptions) != 0 && !reflect.DeepEqual(networkResource.Options, n.driverOptions) {
  		return fmt.Errorf("Network %q needs to be recreated - options have changed", n.fullName())
  	}
  	return err
  }
docs: // EnsureItExists make sure the network exists and return an error if it does not exists
  // and cannot be created.