code: def test_fetch(mock_get: Mock):
      endpoint = InferenceEndpoint.from_raw(
          MOCK_INITIALIZING, namespace="foo"
      )
  
      mock_get.return_value = InferenceEndpoint.from_raw(
          MOCK_RUNNING, namespace="foo"
      )
      endpoint.fetch()
  
      assert endpoint.status == "running"
      assert (
          endpoint.url
          == "https://vksrvs8pc1xnifhq.us-east-1.aws.endpoints.huggingface.cloud"
      )
  
file_path: hub-client/tests/test_inference_endpoints.py
imports: from datetime import datetime, timezone
  from unittest.mock import Mock, patch
  import pytest
  from huggingface_hub import AsyncInferenceClient, HfApi, InferenceClient, InferenceEndpoint, InferenceEndpointError, InferenceEndpointTimeoutError
label_desc: Use image node_id 5 for calling a global function with example usage: test_fetch(mock_get) without return types