code: def validate(self, obj, value):
      if value is None:
          return super(WeightArray, self).validate(obj, value)
      weights = list(value)
      for weight in weights:
          try:
              weight = float(weight)
          except (TypeError, ValueError):
              raise traitlets.TraitError(
                  "{} is not a valid weight. "
                  "Weights must be floats".format(weight)
              )
          if weight < 0.0:
              raise InvalidWeightException(
                  "{} is not a valid weight. "
                  "Weights must be non-negative.".format(weight)
              )
      return super(WeightArray, self).validate(obj, weights)
  
imports: import re
  import traitlets
  from .locations import locations_to_list
label_desc: Use image node_id 1 for calling the WeightArray obj's underlying member method code with example usage: obj.validate(obj, value) and returns: super, super