code: def _resolve_entry(
      name, version_arg
  ) -> Tuple[Optional[Dict], Optional[str]]:
      entry = None
      kind = None
  
      # resolve registry (orgs can have a private registry through their environment variables)
      registry_url = _resolve_app_registry()
  
      # load the app resource
      entry = _resolve_resource(
          registry_url,
          name=name,
          version_arg=version_arg,
          resource_type="app",
          raise_error=False,
      )
  
      if not entry:
          registry_url = _resolve_component_registry()
  
          # load the component resource
          entry = _resolve_resource(
              registry_url,
              name=name,
              version_arg=version_arg,
              resource_type="component",
              raise_error=False,
          )
          kind = "component" if entry else None
  
      else:
          kind = "app"
  
      return entry, kind
  
imports: import os
  import re
  import shutil
  import subprocess
  import sys
  from typing import Dict, Optional, Tuple
  import click
  import requests
  from packaging.version import Version
  from lightning.app.core.constants import LIGHTNING_APPS_PUBLIC_REGISTRY, LIGHTNING_COMPONENT_PUBLIC_REGISTRY
  from lightning.app.utilities.app_helpers import Logger
label_desc: Use image node_id 16 for calling a global function with example usage: _resolve_entry(name, version_arg) and returns: entry,  kind