<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _assert_valid_permission(self, perm_str):
 """Raise D1 exception if ``perm_str`` is not a valid permission."""

        if perm_str not in ORDERED_PERM_LIST:
            raise d1_common.types.exceptions.InvalidRequest(
                0,
                'Permission must be one of {}. perm_str="{}"'.format(
                    ', '.join(ORDERED_PERM_LIST), perm_str
                ),
            )