<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_urls_module_valid_constant(node):
 """Suppress warnings for valid constants in urls module."""

    if node.name not in ('urlpatterns', 'app_name'):
        return False

    parent = node.parent
    while not isinstance(parent, Module):
        parent = parent.parent

    if not parent.name.endswith('urls'):
        return False

    return True