function expandDims_(x, axis = 0) {
    const $x = (0, _tensorUtilEnv.convertToTensor)(x, "x", "expandDims", "string_or_numeric");
    _util.assert(axis <= $x.rank, ()=>"Axis must be <= rank of the tensor");
    const inputs = {
        input: $x
    };
    const attrs = {
        dim: axis
    };
    return (0, _engine.ENGINE).runKernel((0, _kernelNames.ExpandDims), inputs, attrs);
}
Returns a `tf.Tensor` that has expanded rank, by inserting a dimension
into the tensor's shape.

```js
const x = tf.tensor1d([1, 2, 3, 4]);
const axis = 1;
x.expandDims(axis).print();
```

@param x The input tensor whose dimensions are to be expanded.
@param axis The dimension index at which to insert shape of `1`. Defaults
    to 0 (the first dimension).

@doc {heading: 'Tensors', subheading: 'Transformations'}