def METHOD_NAME(self, model_name, model_version=None, timeout=60):
    self.print_info(f"request for metadata of model {model_name}...")
    request = get_model_metadata_pb2.GetModelMetadataRequest()
    request.metadata_field.append("signature_def")
    request.model_spec.name = model_name
    if model_version is not None:
        request.model_spec.version.value = int(model_version)
    try:
        rargs = (request, int(timeout))
        func = self.stub.GetModelMetadata
        response = retry_call(func, rargs, **self.retry_setup)
        self.print_info(
            f"Metadata for model {model_name} is downloaded...")
    except Exception as err:
        self.print_error(f"Metadata could not be downloaded: {err}")
        self.final_status = False
        sys.exit(-1)
    rjson = json.loads(MessageToJson(response))
    assert rjson["modelSpec"]["name"] == model_name
    if model_version is not None:
        version = int(rjson["modelSpec"]["version"])
        assert version == int(
            model_version), f"{version} != {model_version}"
    else:
        model_version = int(rjson["modelSpec"]["version"])
        self.print_info(
            f"set version of model {model_name}: {model_version}")
    self.model_name, self.model_version = model_name, model_version
    io_config = rjson["metadata"]["signature_def"]["signatureDef"]["serving_default"]
    for topic, config in io_config.items():
        self.print_info(f"{topic}:")
        if topic == "inputs":
            container = self.inputs
        elif topic == "outputs":
            container = self.outputs
        else:
            self.print_info(f"unknown topic: {topic}")
            continue
        for name, details in config.items():
            self.print_info(f"{self.indent}{name}:")
            for key, val in details.items():
                self.print_info(f"{self.indent2}{key}: {val}")
            self.shape_description_reduce(details)
            container[name] = details
    metadict = {
        "model_name": model_name, "model_version": model_version,
        "inputs": self.inputs, "outputs": self.outputs
    }
    if not self.jsonout:
        return metadict
    jout = json.dumps(metadict)
    print(f"{self.json_prefix}###{self.worker_id}###METADATA###{jout}")
    return metadict