code: def _parse_services(self, service_config: dict, service_name: str,
                          service_list: dict) -> dict:
          
          for key, value in service_list['services'][service_name].items():
              service_config[key] = value
              if 'command' in key:
                  key = "args"
                  service_config['args'] = value
                  service_config.pop('command')
              if 'ports' in key:
                  endpoint_spec = self._parse_ports(value)
                  service_config['endpoint_spec'] = endpoint_spec
                  service_config.pop('ports')
              if 'volumes' in key:
                  volume_spec = self._parse_volumes(value)
                  service_config['mounts'] = volume_spec
                  service_config.pop('volumes')
              if 'deploy' in key:
                  self._parse_deploy(value, service_config)
                  service_config.pop('deploy')
              if 'networks' in key:
                  network_spec = self._parse_networks(service_list)
                  service_config['networks'] = network_spec
              if 'logging' in key:
                  self._parse_logging(value, service_config)
                  service_config.pop('logging')
              if 'environment' in key:
                  service_config['env'] = value
                  service_config.pop('environment')
  
          # LOG.info('Service Config: %s', service_config)
          return service_config
docs: Parse the docker compose file.
  
          Args:
              service_config (dict): Service configurations from the compose file
              service_name (string): Name of the services
              service_list (dict): Service configuration list
  
          Returns:
              dict, service specifications extracted from the compose file