lib/Elastica/QueryBuilder/DSL/Aggregation.php
public function avg_bucket(string $name, string $bucketsPath = null): AvgBucket
    {
        return new AvgBucket($name, $bucketsPath);
    }
public function avg_bucket(string $name, string $bucketsPath = null): AvgBucket
    {
        return new AvgBucket($name, $bucketsPath);
    }
public function avg_bucket ( string $ name , string $ bucketsPath = null ) : AvgBucket { return new AvgBucket ( $ name , $ bucketsPath ) ; }
avg bucket aggregation.

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-avg-bucket-aggregation.html

@param string      $name
@param string|null $bucketsPath

@return AvgBucket
avg bucket aggregation .