def METHOD_NAME(match_type, pname, interesting_processes):
    """Return True if the pname matches an interesting_processes."""
    pname = os.path.splitext(pname)[0]
    for ip in interesting_processes:
        if match_type == 'exact' and pname == ip or match_type == 'contains' and ip in pname:
            return True
    return False