import re


def get_signature(source, start):
    """
    Get function signature and process it
    """
    match = re.search(r'c?p?def.+\(', source[start].strip())
    if not match:
        return
    start_j = match.span()[1]
    open_brackets = 1
    new_sign = match.group()

    for i in range(start, len(source)):
        line = source[i].strip()
        for j in range(start_j, len(line)):
            char = line[j]
            if char == ')':
                open_brackets -= 1
            if char == '(':
                open_brackets += 1
            new_sign += char
            if not open_brackets:
                return new_sign + ':\n', i - start
        start_j = 0