<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _is_requirement(line):
 """Returns whether the line is a valid package requirement."""

    line = line.strip()
    return line and not (line.startswith("-r") or line.startswith("#"))