def already_visited(string):
    """
    Helper method used to identify if a subroutine call or definition has
    already been visited by the script in another instance
    :param string: The call or definition of a subroutine/function
    :return: a boolean indicating if it has been visited already or not
    """
    separated = string.partition('(')[2]
    if separated.replace(' ', '').replace('(', '')[:2] == 'gr':
        visited = True
    else:
        visited = False

    return visited