def _ShouldRetry(self, response):
    if response.error:
      # Check for socket errors.
      if type(response.error) == socket.error or type(response.error) == socket.gaierror:
        return True

      # Check for HTTP errors.
      if isinstance(response.error, HTTPError):
        code = response.error.code
        if code in (500, 503, 599):
          return True

    return False
get the relatives of a node (successors xor predecessors)
dataset/ETHPy150Open viewfinderco/viewfinder/backend/storage/async_s3.py/S3RetryPolicy._ShouldRetry--crossover with--dataset/ETHPy150Open kakwa/pygraph_redis/pygraph_redis/directed_graph.py/Directed_graph._get_relative