<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tweets_files(string, path):
 """Iterates over json files in path."""

    for filename in os.listdir(path):
        if re.match(string, filename) and ".jsonl" in filename:
            f = gzip.open if ".gz" in filename else open
            yield path + filename, f

            Ellipsis