class_docstr: To normalize the repo.
  
  Args:
      uri (`str`):
          The uri of the repo.
class_docstr_tok: ["To","normalize","the","repo",".","Args",":","uri","(","`","str","`",")",":","The","uri","of","the","repo","."]
docstr: Check if the repo name matches the format.
  
  Args:
      repo (`str`):
          Repo name.
  
  Returns:
      (`bool`)
          Check if matched.
  
  Raises:
      (`ValueError`)
          Raise error if false.
docstr_tok: ["Check","if","the","repo","name","matches","the","format",".","Args",":","repo","(","`","str","`",")",":","Repo","name",".","Returns",":","(","`","bool","`",")","Check","if","matched",".","Raises",":","(","`","ValueError","`",")","Raise","error","if","false","."]
code: def check_repo(repo: str) -> bool:
      """
      Check if the repo name matches the format.
  
      Args:
          repo (`str`):
              Repo name.
  
      Returns:
          (`bool`)
              Check if matched.
  
      Raises:
          (`ValueError`)
              Raise error if false.
      """
      repo_list = repo.strip("]").split("[")
      if "_" not in repo and (
          repo.endswith("]")
          and len(repo_list) == 2
          or len(repo_list) == 1
          and not repo.endswith("]")
      ):
          return True
      else:
          raise ValueError(
              f"repo: {repo} does not match the 'repo-name[framework]' format!"
          )
  
file_path: towhee/towhee/utils/repo_normalize.py
imports: import re
  from urllib.parse import urlparse, parse_qsl, urlsplit
  from typing import NamedTuple
label_desc: Use image node_id 8 for calling the RepoNormalize obj's underlying member method code with example usage: obj.check_repo(repo) and returns: True