from typing import Dict


def find_security(content: Dict, scheme: str) -> bool:
    """Check if security scheme is used in the provided content.

    Arguments
    ---------
    content
        OpenAPI document to be cleaned up.
    scheme
        Security scheme to be searched.

    Returns
    -------
    Flag determining presence of the security scheme in the content.

    """
    if isinstance(content, list):
        for item in content:
            if find_security(item, scheme):
                return True
    if isinstance(content, dict):
        for key, value in content.items():
            if key == 'security':
                for security in value:
                    if isinstance(security, dict) and scheme in security:
                        return True
            if find_security(value, scheme):
                return True
    return False