def CallsMethod(codes, method):
    """Spin through all the input method signatures.  For each one, return
    whether or not there is method invokation line in the codes section that
    lists the method as the target."""

    start = 0

    while True:
        # Find the next reference to the method signature
        match = codes.find(method, start)

        if match is -1:
            break;

        # Find the beginning of the line the method reference is on
        startOfLine = codes.rfind("\n", 0, match) + 1

        # If the word 'invoke' comes between the beginning of the line
        # and the method reference, then it is a call to that method rather
        # than the beginning of the code section for that method.
        if codes.find("invoke", startOfLine, match) is not -1:
            return True

        start = match + len(method)

    return False