code: def _download_features_file(
      endpoint: Optional[str],
      api_key: Optional[str],
      trace_id: str,
      features_id: str,
      metrics_calculation: bool,
  ) -> pd.DataFrame:
      file_content = get_rest_client(
          endpoint, api_key
      ).get_search_features_file_v2(
          trace_id, features_id, metrics_calculation
      )
      return _read_parquet(file_content)
  
imports: import tempfile
  import time
  from functools import lru_cache
  from typing import Dict, List, Optional
  import pandas
  from upgini import dataset
  from upgini.http import LoggerFactory, ProviderTaskSummary, SearchProgress, SearchTaskSummary, get_rest_client, is_demo_api_key
  from upgini.metadata import SYSTEM_RECORD_ID, FeaturesMetadataV2, FileMetadata, GeneratedFeatureMetadata, ModelTaskType, ProviderTaskMetadataV2, RuntimeParameters
  from upgini.resource_bundle import bundle
  from upgini.spinner import Spinner
label_desc: Use image node_id 4 for calling a global function with example usage: _download_features_file(endpoint, api_key, trace_id, features_id, metrics_calculation) and returns: _read_parquet