code: def _collect_services(cls):
      if cls._method_to_handlers is not None:
          return
  
      cls._method_to_handlers = defaultdict(dict)
      for attr in dir(cls):
          handle_func = getattr(cls, attr, None)
          if not hasattr(handle_func, "_web_api_defs"):
              continue
          web_api_defs = getattr(
              handle_func, "_web_api_defs"
          )  # type: List[_WebApiDef]
          for api_def in web_api_defs:
              cls._method_to_handlers[api_def.method.lower()][
                  handle_func
              ] = api_def
  
imports: import asyncio
  import functools
  import inspect
  import logging
  import re
  import sys
  import urllib.parse
  from collections import defaultdict
  from typing import Callable, Dict, List, NamedTuple, Optional, Type, Union
  from tornado import httpclient, web
  from tornado.simple_httpclient import HTTPRequest, HTTPTimeoutError
  from ...lib.aio import alru_cache
  from ...utils import serialize_serializable, deserialize_serializable
label_desc: Use image node_id 4 for calling the MarsServiceWebAPIHandler obj's underlying member method code with example usage: obj._collect_services(cls) without return types