class_docstr: Group of functions related to elasticsearch aggregations requests
class_docstr_tok: ["Group","of","functions","related","to","elasticsearch","aggregations","requests"]
code: def nested_aggregation(
      nested_path: str, inner_aggregation: Dict[str, Any]
  ) -> Dict[str, Any]:
      inner_meta = list(inner_aggregation.values())[0].get("meta", {})
      return {
          "meta": {
              "kind": inner_meta.get("kind", "custom"),
          },
          "nested": {"path": nested_path},
          "aggs": inner_aggregation,
      }
  
imports: from enum import Enum
  from typing import Any, Dict, List, Optional, Type, Union
  from argilla.server.commons.models import TaskStatus
  from argilla.server.daos.backend.mappings.helpers import mappings
  from argilla.server.pydantic_v1 import BaseModel
label_desc: Use image node_id 1 for calling the aggregations obj's underlying member method code with example usage: obj.nested_aggregation(nested_path, inner_aggregation) and returns: dict