code: def validate(user_input, ret_errs=False, print_errs=False):
      
  
      errs = run_validator(user_input)
      passed = len(errs) == 0
  
      if print_errs:
          for err in errs:
              print(err)
  
      if ret_errs:
          return passed, errs
  
      return passed
docs: Wrapper for run_validator function that returns True if the user_input
      contains a valid STIX pattern or False otherwise. The error messages may
      also be returned or printed based upon the ret_errs and print_errs arg
      values.