def auto_retry(api_call_method):
    def call_wrapper(*args, **kwargs):
        try:
            return api_call_method(*args, **kwargs)
        except APIError as error:
            # Try Again Once
            if error.error_code in [500]:
                try:
                    print("Got a 500, trying again...")
                    return api_call_method(*args, **kwargs)
                except APIError as another_error:
                    if another_error.error_code in [500, 400, 404]:
                        pass
                    else:
                        raise another_error

            # Skip
            elif error.error_code in [400, 404]:
                print("Got a 400 or 404")
                pass

            # Fatal
            else:
                raise error
    return call_wrapper


# Set get_match and get_summoner_by* to automatically retry if we get a 500, or skip if we get a 400 or 403
# The above decorator wraps these functions, applying the functionality in the decorator to the wrapped functions.
Encode a list of Tensor events with protobuf
dataset/ETHPy150Open meraki-analytics/cassiopeia/examples/match_collection.py/auto_retry--crossover with--dataset/ETHPy150Open calston/tensor/tensor/protocol/riemann.py/RiemannProtobufMixin.encodeMessage