class_docstr: Process children of list items.
  
  Example
  
      * a list item
          process this part
  
          or this part
class_docstr_tok: ["Process","children","of","list","items",".","Example","*","a","list","item","process","this","part","or","this","part"]
docstr: Get level of indentation based on list level. 
docstr_tok: ["Get","level","of","indentation","based","on","list","level","."]
code: def get_level(
      self, parent: etree.Element, block: str
  ) -> tuple[int, etree.Element]:
      """Get level of indentation based on list level."""
      # Get indent level
      m = self.INDENT_RE.match(block)
      if m:
          indent_level = len(m.group(1)) / self.tab_length
      else:
          indent_level = 0
      if self.parser.state.isstate("list"):
          # We're in a tight-list - so we already are at correct parent.
          level = 1
      else:
          # We're in a loose-list - so we need to find parent.
          level = 0
      # Step through children of tree to find matching indent level.
      while indent_level > level:
          child = self.lastChild(parent)
          if child is not None and (
              child.tag in self.LIST_TYPES
              or child.tag in self.ITEM_TYPES
          ):
              if child.tag in self.LIST_TYPES:
                  level += 1
              parent = child
          else:
              # No more child levels. If we're short of `indent_level`,
              # we have a code block. So we stop here.
              break
      return level, parent
  
imports: from __future__ import annotations
  import logging
  import re
  import xml.etree.ElementTree
  from typing import TYPE_CHECKING, Any
  from .None import util
  from .blockparser import BlockParser
label_desc: Use image node_id 5 for calling the ListIndentProcessor obj's underlying member method code with example usage: obj.get_level(parent, block) and returns: level,  parent