def _process_response(response: object, success: bool) ->str:
    """Process response from batch caller

        Args:
            response (Object): Requests library response object
            success (bool): success condition given by bool or lambda

        Returns:
            str: batch status FINISH | FAILED
        """
    if response.status_code == 200 and response.text:
        batch_data: dict = response.json()
        return batch_data['status']
    if success:
        return 'FINISH'
    return 'FAILED'
