def METHOD_NAME(lines: List[str], defines: Dict[str, str]) -> List[str]:
    """Locate and apply #define values
    :param lines: List of source lines
    :param defines: dict with ``name: value`` pairs.
    """
    for nr, line in enumerate(lines):
        line = line.strip()
        if line.startswith("#define"):
            try:
                name = line.split()[1]
                value = defines.get(name)
                if not value:
                    continue
                lines[nr] = "#define {} {}".format(name, str(value))
            except IndexError:
                pass
    return lines