def METHOD_NAME(dot_path: str, summarize: bool = False):
    importlib.invalidate_caches()
    module_path, obj_name = ".".join(dot_path.split(".")[:-1]), dot_path.split(".")[-1]
    module = importlib.import_module(module_path)
    obj = getattr(module, obj_name)
    source = inspect.getsource(obj)
    if not summarize:
        return source
    elif inspect.isclass(obj):
        lines = source.split("\n")
        newlines = [lines[0]]
        whitespace_len = float("inf")
        k = 1
        started = False
        while k < len(lines):
            l = lines[k]
            lstripped = l.lstrip()
            if started:
                newlines.append(l)
                started = "):" not in l and "->" not in l
                if not started:
                    newlines.append(l[: cast(int, whitespace_len)] + "    ...\n")
            if (
                l.lstrip().startswith("def ")
                and len(l) - len(lstripped) <= whitespace_len
            ):
                whitespace_len = len(l) - len(lstripped)
                newlines.append(l)
                started = "):" not in l and "->" not in l
                if not started:
                    newlines.append(l[:whitespace_len] + "    ...\n")
            k += 1
        return "\n".join(newlines).strip()
    elif inspect.isfunction(obj):
        return source.split("\n")[0] + "\n    ..."
    else:
        return