code: def get(self, service_name):
      try:
          service = self.config["services"][service_name]
      except KeyError:
          raise UndefinedImage(service_name)
      service["name"] = service_name
      service["need_gpu"] = service_name in self.with_gpus
      service["ancestors"] = self.hierarchy[service_name]
      return service
  
imports: import os
  import shlex
  import subprocess
  from io import StringIO
  from dotenv import dotenv_values
  from ruamel.yaml import YAML
  from ..utils.command import Command, default_bin
  from ..utils.source import arrow_path
  from ..compat import _ensure_path
label_desc: Use image node_id 4 for calling the ComposeConfig obj's underlying member method code with example usage: obj.get(service_name) and returns: service