def METHOD_NAME(check):
    """
    Squid can return a trailing newline at the end of its metrics and it would be
    treated as a metric line: an error would be raised attempting to parse the line
    due to a missing = character.
    See https://github.com/DataDog/integrations-core/pull/1643
    """
    with mock.patch('datadog_checks.squid.squid.requests.get') as g:
        with mock.patch('datadog_checks.squid.SquidCheck.submit_version'):
            g.return_value = mock.MagicMock(text="client_http.requests=42\n\n")
            check.parse_counter = mock.MagicMock(return_value=('foo', 'bar'))
            check.get_counters('host', 'port', [])
            # we assert `parse_counter` was called only once despite the raw text
            # containing multiple `\n` chars
            check.parse_counter.assert_called_once()