code: def services(self, service_group=None):
      
      # Specific service group requested
      if service_group is not None:
        if service_group not in EFConfig.SERVICE_GROUPS:
          raise RuntimeError("service registry: {} doesn't have '{}' section listed in EFConfig".format(
            self._service_registry_file, service_group))
        else:
          return self.service_registry_json[service_group]
      # Specific service group not requested - flatten and return all service records
      else:
        result = dict()
        for service_group in EFConfig.SERVICE_GROUPS:
          result.update(self.service_registry_json[service_group])
        return result
docs: Args:
        service_group: optional name of service group
      Returns:
        if service_group is omitted or None, flattened dict of all service records in the service registry
        if service_group is present, dict of service records in that group