code: def validate(self, instance, value):
          
          try:
              compval = complex(value)
              if not self.cast and (
                      abs(value.real - compval.real) > TOL or
                      abs(value.imag - compval.imag) > TOL
              ):
                  self.error(
                      instance=instance,
                      value=value,
                      extra='Not within tolerance range of {}.'.format(TOL),
                  )
          except (TypeError, ValueError, AttributeError):
              self.error(instance, value)
          return compval
docs: Checks that value is a complex number
  
          Floats and Integers are coerced to complex numbers