docs: 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
                  ),
              )