code: def _cast_expected_to_returned_type(expected, returned):
          '''
          Determine the type of variable returned
          Cast the expected to the type of variable returned
          '''
          ret_type = type(returned)
          new_expected = expected
          if expected == "False" and ret_type == bool:
              expected = False
          try:
              new_expected = ret_type(expected)
          except ValueError:
              log.info("Unable to cast expected into type of returned")
              log.info("returned = %s", returned)
              log.info("type of returned = %s", type(returned))
              log.info("expected = %s", expected)
              log.info("type of expected = %s", type(expected))
          return new_expectef _cast_expected_to_returned_type(expected, returned):
          '''
          Determine the type of variable returned
          Cast the expected to the type of variable returned
          '''
          ret_type = type(returned)
          new_expected = expected
          if expected == "False" and ret_type == bool:
              expected = False
          try:
              new_expected = ret_type(expected)
          except ValueError:
              log.info("Unable to cast expected into type of returned")
              log.info("returned = %s", returned)
              log.info("type of returned = %s", type(returned))
              log.info("expected = %s", expected)
              log.info("type of expected = %s", type(expected))
          return new_expected
docs: Determine the type of variable returned
          Cast the expected to the type of variable returned