def blackify(code: str) -> str:
    """
    Applies the black part of our `make style` command to some code.

    Args:
        code (`str`): The code to format.

    Returns:
        `str`: The formatted code.
    """
    has_indent = len(get_indent(code)) > 0
    if has_indent:
        code = f"class Bla:\n{code}"
    mode = black.Mode(target_versions={black.TargetVersion.PY37}, line_length=119)
    result = black.format_str(code, mode=mode)
    result, _ = style_docstrings_in_code(result)
    return result[len("class Bla:\n") :] if has_indent else result

    Applies the black part of our `make style` command to some code.

    Args:
        code (`str`): The code to format.

    Returns:
        `str`: The formatted code.
    
dpkd/transformers/utils/check_copies.py