def METHOD_NAME(request, etm_id):
    """
    get_scan_state(scan_id)
        Function that informs requestor about actual state of specified scan
    @param scan_id: ID of requested scan (returned by create_scan function)
    @type scan_id: string or int
    @rtype: dictionary
    @return:
     - status: status message: { 'OK', 'ERROR', 'INELIGIBLE' }
     - message: in case of error, here is detailed message
     - state: state of scan. It can be one of following values:
       {'QUEUED', 'SCANNING', 'NEEDS_INSPECTION', 'WAIVED', 'PASSED',
        'FAILED', 'BASE_SCANNING', 'CANCELED', 'DISPUTED'}
    """
    logger.info('[SCAN_STATE] %s', etm_id)
    response = {}
    try:
        etm = ETMapping.objects.get(id=etm_id)
    except ObjectDoesNotExist:
        response['status'] = 'ERROR'
        response['message'] = "Scan %s does not exist." % etm_id
    except Exception as ex:  # noqa: B902
        response['status'] = 'ERROR'
        response['message'] = "Unable to retrieve scan's state, error: %s" % ex
    else:
        message = getattr(etm, 'comment', '')
        if message:
            response['message'] = message
        status_number = getattr(etm, 'state', REQUEST_STATES.get_num("OK"))
        response['status'] = REQUEST_STATES.get_value(status_number)
        if etm.latest_run:
            response['state'] = SCAN_STATES.get_value(
                etm.latest_run.scan.state)
    logger.info('[SCAN_STATE] => %s', response)
    return response