def METHOD_NAME(config, completion_item, document):
    """Resolve formatted completion for given non-resolved completion"""
    shared_data = document.shared_data['LAST_ROPE_COMPLETIONS'].get(completion_item['label'])
    completion_capabilities = config.capabilities.get('textDocument', {}).get('completion', {})
    item_capabilities = completion_capabilities.get('completionItem', {})
    supported_markup_kinds = item_capabilities.get('documentationFormat', ['markdown'])
    preferred_markup_kind = _utils.choose_markup_kind(supported_markup_kinds)
    if shared_data:
        completion, data = shared_data
        return _resolve_completion(completion, data, preferred_markup_kind)
    return completion_item