code: def tstd(samples, weights=None, k=0, clip=False):
      """calculate the (weighted) trimmed standard deviation for a list of points
  
      Inputs:
          samples -- a list of sample points
          weights -- a list of sample weights
          k -- percent samples to trim (k%) [tuple (lo,hi) or float if lo=hi]
          clip -- if True, winsorize instead of trimming k% of samples
  
      NOTE: if all samples are excluded, will return nan"""
      import numpy as np
  
      return np.sqrt(tvariance(samples, weights, k, clip))
  
imports: from mystic.math.stats import *
  from mystic.math.samples import *
  from mystic.math.integrate import *
  from mystic.symbolic import generate_solvers, generate_constraint, solve
  from mystic.symbolic import generate_conditions, generate_penalty
  from mystic.math import almostEqual
  from mystic.math.distance import Lnorm
  from numpy import asarray
label_desc: Use image node_id 46 for calling a global function with example usage: tstd(samples, weights, k, clip) and returns: np