code: def with_std(target):
      """bind a standard deviation constraint to a given constraints function.
  
      Inputs:
          target -- the target standard deviation
  
      A constraints function takes an iterable x as input, returning a modified x.
      This function is an "outer" coupling of "impose_std" onto another
      constraints function c(x), such that:  x' = impose_std(target, c(x)).
  
      Examples:
          >>> @with_std(1.0)
          ... def constraint(x):
          ...   x[-1] = x[0]
          ...   return x
          ...
          >>> x = constraint([1,2,3])
          >>> print(x)
          [0.6262265521467858, 2.747546895706428, 0.6262265521467858]
          >>> std(x)
          0.99999999999999956
      """
      return with_variance(target**2)
  
imports: from mystic.math.measures import *
  from mystic.math import almostEqual
  from numpy import sum
  from numpy import asfarray, asarray, choose, zeros, ones, ndarray
  from numpy import shape, broadcast, empty, atleast_1d
  from numpy import round, abs
  from random import randrange, shuffle
  from numpy import array, intersect1d, inf, isnan, where, choose, clip
  from numpy.random import uniform, choice
  from numpy import maximum, minimum
  from numpy import round, abs
  from mystic.tools import synchronized, connected
  from mystic.math.discrete import product_measure
label_desc: Use image node_id 6 for calling a global function with example usage: with_std(target) and returns: with_variance