original_docstring: 
          Decode and validate a Bech32 string, determining its HRP and data.
  
          Args:
              bech_str (str)    : Bech32 string
              sep (str)         : Bech32 separator
              checksum_len (int): Checksum length
  
          Returns:
              tuple[str, list[int]]: HRP (index 0) and data part (index 1)
  
          Raises:
              ValueError: If the string is not valid
              Bech32ChecksumError: If the checksum is not valid
          
docstring: Decode and validate a Bech32 string, determining its HRP and data.
docstring_tokens: Decode and validate a Bech32 string determining its HRP and data .
code: def _DecodeBech32(cls,
                        bech_str: str,
                        sep: str,
                        checksum_len: int) -> Tuple[str, List[int]]:
          """
          Decode and validate a Bech32 string, determining its HRP and data.
  
          Args:
              bech_str (str)    : Bech32 string
              sep (str)         : Bech32 separator
              checksum_len (int): Checksum length
  
          Returns:
              tuple[str, list[int]]: HRP (index 0) and data part (index 1)
  
          Raises:
              ValueError: If the string is not valid
              Bech32ChecksumError: If the checksum is not valid
          """
  
          # Check string length and case
          if len(bech_str) > Bech32BaseConst.MAX_STR_BYTE_LEN or AlgoUtils.IsStringMixed(bech_str):
              raise ValueError(f"Invalid bech32 format (length not valid: {len(bech_str)})")
  
          # Lower string
          bech_str = bech_str.lower()
  
          # Find separator and check its position
          sep_pos = bech_str.rfind(sep)
          if sep_pos == -1:
              raise ValueError("Invalid bech32 format (no separator found)")
  
          # Get HRP and check it
          hrp = bech_str[:sep_pos]
          if len(hrp) == 0 or any(ord(x) < 33 or ord(x) > 126 for x in hrp):
              raise ValueError(f"Invalid bech32 format (HRP not valid: {hrp})")
  
          # Get data and check it
          data_part = bech_str[sep_pos + 1:]
          if (len(data_part) < Bech32BaseConst.MIN_DATA_PART_BYTE_LEN
                  or not all(x in Bech32BaseConst.CHARSET for x in data_part)):
              raise ValueError("Invalid bech32 format (data part not valid)")
  
          # Convert back from alphabet and verify checksum
          int_data = [Bech32BaseConst.CHARSET.find(x) for x in data_part]
          if not cls._VerifyChecksum(hrp, int_data):
              raise Bech32ChecksumError("Invalid bech32 checksum")
  
          return hrp, int_data[:-checksum_len]
code_tokens: def _DecodeBech32 ( cls , bech_str : str , sep : str , checksum_len : int ) -> Tuple [ str , List [ int ] ] : if len ( bech_str ) > Bech32BaseConst . MAX_STR_BYTE_LEN or AlgoUtils . IsStringMixed ( bech_str ) : raise ValueError ( f"Invalid bech32 format (length not valid: {len(bech_str)})" ) bech_str = bech_str . lower ( ) sep_pos = bech_str . rfind ( sep ) if sep_pos == - 1 : raise ValueError ( "Invalid bech32 format (no separator found)" ) hrp = bech_str [ : sep_pos ] if len ( hrp ) == 0 or any ( ord ( x ) < 33 or ord ( x ) > 126 for x in hrp ) : raise ValueError ( f"Invalid bech32 format (HRP not valid: {hrp})" ) data_part = bech_str [ sep_pos + 1 : ] if ( len ( data_part ) < Bech32BaseConst . MIN_DATA_PART_BYTE_LEN or not all ( x in Bech32BaseConst . CHARSET for x in data_part ) ) : raise ValueError ( "Invalid bech32 format (data part not valid)" ) int_data = [ Bech32BaseConst . CHARSET . find ( x ) for x in data_part ] if not cls . _VerifyChecksum ( hrp , int_data ) : raise Bech32ChecksumError ( "Invalid bech32 checksum" ) return hrp , int_data [ : - checksum_len ]
short_docstring: Decode and validate a Bech32 string, determining its HRP and data.
short_docstring_tokens: Decode and validate a Bech32 string determining its HRP and data .
comment: """
          Decode and validate a Bech32 string, determining its HRP and data.
  
          Args:
              bech_str (str)    : Bech32 string
              sep (str)         : Bech32 separator
              checksum_len (int): Checksum length
  
          Returns:
              tuple[str, list[int]]: HRP (index 0) and data part (index 1)
  
          Raises:
              ValueError: If the string is not valid
              Bech32ChecksumError: If the checksum is not valid
          """$SEP$# Check string length and case$SEP$# Lower string$SEP$# Find separator and check its position$SEP$# Get HRP and check it$SEP$# Get data and check it$SEP$# Convert back from alphabet and verify checksum