def METHOD_NAME(
    encoded_test_rec: Dict[Text, Any], allow_nan: bool = False, **kwargs
) -> Iterator[Text]:
  """Convert the JSON object encoded test record into a stream of strings.
  Args:
    encoded_test_rec: The JSON converted test record.
    allow_nan: If False, out of range float values will raise ValueError.
    **kwargs: Additional arguments to be passed to the JSON encoder.
  Returns:
    Iterable of JSON strings.
  """
  json_encoder = TestRecordEncoder(allow_nan=allow_nan, **kwargs)
  # The iterencode return type in typeshed for PY2 is wrong; not worried about
  # fixing it as we are droping PY2 support soon.
  return json_encoder.iterencode(encoded_test_rec)  # pytype: disable=bad-return-type