class_docstr: 判断是否实现了 __len__ 和 __getitem__ 方法的类
class_docstr_tok: ["\u5224\u65ad\u662f\u5426\u5b9e\u73b0\u4e86","__len__","\u548c","__getitem__","\u65b9\u6cd5\u7684\u7c7b"]
code: def __subclasshook__(cls, subclass: Any) -> Union[bool, Any]:
      if cls is HasLenGetitemType:
          flag = callable(
              getattr(subclass, "__getitem__", None)
          ) and callable(getattr(subclass, "__len__", None))
          return flag
      return NotImplemented
  
file_path: fastNLP/fastNLP/core/dataloaders/utils.py
imports: import os
  from typing import Callable, Any, Union, Sequence
  from abc import ABC
  import inspect
  import ast
  from ..log import logger
  from ..utils.cache_results import get_func_calls, truncate_start_blanks
label_desc: Use image node_id 1 for calling the HasLenGetitemType obj's underlying member method code with example usage: obj.__subclasshook__(cls, subclass) and returns: NotImplemented, flag