def _should_retry(self, context):
<EOL>if context.count >= self.max_attempts:<EOL><INDENT>return False<EOL><DEDENT>status = None<EOL>if context.response and context.response.status:<EOL><INDENT>status = context.response.status<EOL><DEDENT>if status is None:<EOL><INDENT>'''<STR_LIT>'''<EOL>return True<EOL><DEDENT>elif <NUM_LIT:200> <= status < <NUM_LIT>:<EOL><INDENT>'''<STR_LIT>'''<EOL>return True<EOL><DEDENT>elif <NUM_LIT> <= status < <NUM_LIT>:<EOL><INDENT>'''<STR_LIT>'''<EOL>if status == <NUM_LIT> and context.location_mode == LocationMode.SECONDARY:<EOL><INDENT>return True<EOL><DEDENT>if status == <NUM_LIT>:<EOL><INDENT>return True<EOL><DEDENT>return False<EOL><DEDENT>elif status >= <NUM_LIT>:<EOL><INDENT>'''<STR_LIT>'''<EOL>if status == <NUM_LIT> or status == <NUM_LIT>:<EOL><INDENT>return False<EOL><DEDENT>return True<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
A function which determines whether or not to retry.

:param ~..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.
:return: 
    A boolean indicating whether or not to retry the request.
:rtype: bool