original_docstring: 
      This function is used to validate whether the ping results were unexpected per "state" param.
      
docstring: This function is used to validate whether the ping results were unexpected per "state" param.
docstring_tokens: This function is used to validate whether the ping results were unexpected per " state " param .
code: def validate_results(module, loss, results):
      """
      This function is used to validate whether the ping results were unexpected per "state" param.
      """
      state = module.params["state"]
      if state == "present" and loss == 100:
          module.fail_json(msg="Ping failed unexpectedly", **results)
      elif state == "absent" and loss < 100:
          module.fail_json(msg="Ping succeeded unexpectedly", **results)
code_tokens: def validate_results ( module , loss , results ) : state = module . params [ "state" ] if state == "present" and loss == 100 : module . fail_json ( msg = "Ping failed unexpectedly" , ** results ) elif state == "absent" and loss < 100 : module . fail_json ( msg = "Ping succeeded unexpectedly" , ** results )
short_docstring: This function is used to validate whether the ping results were unexpected per "state" param.
short_docstring_tokens: This function is used to validate whether the ping results were unexpected per " state " param .
comment: """
      This function is used to validate whether the ping results were unexpected per "state" param.
      """