Extracts the '@cyther' code to be run as a script after compilation

def extractAtCyther(string):
    """
    Extracts the '@cyther' code to be run as a script after compilation
    """
    if isinstance(string, str) and os.path.isfile(string):
        with open(string) as file:
            string = file.read()

    found_pound = extract(POUND_PATTERN, string)
    found_tripple = extract(TRIPPLE_PATTERN, string)
    all_found = found_pound + found_tripple
    code = '\n'.join([item for item in all_found])

    return code