def _retry(self, context, backoff):
<EOL>if not hasattr(context, '<STR_LIT:count>'):<EOL><INDENT>context.count = <NUM_LIT:0><EOL><DEDENT>if self._should_retry(context):<EOL><INDENT>backoff_interval = backoff(context)<EOL>context.count += <NUM_LIT:1><EOL>if self.retry_to_secondary:<EOL><INDENT>self._set_next_host_location(context)<EOL><DEDENT>return backoff_interval<EOL><DEDENT>return None<EOL>
A function which determines whether and how to retry.

:param ~azure.storage.models.RetryContext context: 
    The retry context. This contains the request, response, and other data 
    which can be used to determine whether or not to retry.
:param function() backoff:
    A function which returns the backoff time if a retry is to be performed.
:return: 
    An integer indicating how long to wait before retrying the request, 
    or None to indicate no retry should be performed.
:rtype: int or None