def tail(self, log_group_name, start=None, filter_pattern=None, max_retries=<NUM_LIT:1000>, poll_interval=<NUM_LIT>):
<EOL>latest_event_time = <NUM_LIT:0>  <EOL>if start:<EOL><INDENT>latest_event_time = to_timestamp(start)<EOL><DEDENT>counter = max_retries<EOL>while counter > <NUM_LIT:0>:<EOL><INDENT>LOG.debug("<STR_LIT>", log_group_name, str(latest_event_time))<EOL>has_data = False<EOL>counter -= <NUM_LIT:1><EOL>events_itr = self.fetch(log_group_name,<EOL>start=to_datetime(latest_event_time),<EOL>filter_pattern=filter_pattern)<EOL>for event in events_itr:<EOL><INDENT>has_data = True<EOL>if event.timestamp_millis > latest_event_time:<EOL><INDENT>latest_event_time = event.timestamp_millis<EOL><DEDENT>yield event<EOL><DEDENT>if has_data:<EOL><INDENT>counter = max_retries<EOL>latest_event_time += <NUM_LIT:1>  <EOL><DEDENT>time.sleep(poll_interval)<EOL><DEDENT>
** This is a long blocking call **

Fetches logs from CloudWatch logs similar to the ``fetch`` method, but instead of stopping after all logs have
been fetched, this method continues to poll CloudWatch for new logs. So this essentially simulates the
``tail -f`` bash command.

If no logs are available, then it keep polling for ``timeout`` number of seconds before exiting. This method
polls CloudWatch at around ~3 Calls Per Second to stay below the 5TPS limit.

Parameters
----------
log_group_name : str
    Name of CloudWatch Logs Group to query.

start : datetime.datetime
    Optional start time for logs. Defaults to '5m ago'

filter_pattern : str
    Expression to filter the logs by. This is passed directly to CloudWatch, so any expression supported by
    CloudWatch Logs API is supported here.

max_retries : int
    When logs are not available, this value determines the number of times to retry fetching logs before giving
    up. This counter is reset every time new logs are available.

poll_interval : float
    Number of fractional seconds wait before polling again. Defaults to 300milliseconds.
    If no new logs available, this method will stop polling after ``max_retries * poll_interval`` seconds

Yields
------
samcli.lib.logs.event.LogEvent
    Object containing the information from each log event returned by CloudWatch Logs