# Buggy code
def from_proj(proj_from, proj_to, skip_equivalent=False, always_xy=False):
    """Make a Transformer from a :obj:`~pyproj.proj.Proj` or input used to create one.

    Parameters
    ----------
    proj_from: :obj:`~pyproj.proj.Proj` or input used to create one
        Projection of input data.
    proj_to: :obj:`~pyproj.proj.Proj` or input used to create one
        Projection of output data.
    skip_equivalent: bool, optional
        If true, will skip the transformation operation if input and output
        projections are equivalent. Default is false.
    always_xy: bool, optional
        If true, the transform method will accept as input and return as output
        coordinates using the traditional GIS order, that is longitude, latitude
        for geographic CRS and easting, northing for most projected CRS.
        Default is false.

    Returns
    -------
    :obj:`~Transformer`

    """
    if not isinstance(proj_from, Proj):
        proj_from = Proj(proj_from)
    if not isinstance(proj_to, Proj):
        proj_to = Proj(proj_to)

    transformer = Transformer()
    transformer._transformer = _Transformer.from_crs(
        proj_from.crs,
        proj_to.crs,
        skip_equivalent=skip_equivalent,
        always_xy=always_xy,
    )
    return transformer


# Traceback (AttributeError)
In [4]: t = pyproj.Transformer()

In [5]: t
Out[5]: <pyproj.transformer.Transformer at 0x7fd75ff9b860>

In [6]: t.transform(0, 0)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-65405fa99360> in <module>
----> 1 t.transform(0, 0)

~/scipy/repos/pyproj/pyproj/transformer.py in transform(self, xx, yy, zz, tt, radians, errcheck, direction)
207             intime = None
208         # call pj_transform.  inx,iny,inz buffers modified in place.
--> 209         self._transformer._transform(
210             inx,
211             iny,

AttributeError: 'Transformer' object has no attribute '_transformer'

# Fixed code
def from_proj(proj_from, proj_to, skip_equivalent=False, always_xy=False):
    """Make a Transformer from a :obj:`~pyproj.proj.Proj` or input used to create one.

    Parameters
    ----------
    proj_from: :obj:`~pyproj.proj.Proj` or input used to create one
        Projection of input data.
    proj_to: :obj:`~pyproj.proj.Proj` or input used to create one
        Projection of output data.
    skip_equivalent: bool, optional
        If true, will skip the transformation operation if input and output
        projections are equivalent. Default is false.
    always_xy: bool, optional
        If true, the transform method will accept as input and return as output
        coordinates using the traditional GIS order, that is longitude, latitude
        for geographic CRS and easting, northing for most projected CRS.
        Default is false.

    Returns
    -------
    :obj:`~Transformer`

    """
    if not isinstance(proj_from, Proj):
        proj_from = Proj(proj_from)
    if not isinstance(proj_to, Proj):
        proj_to = Proj(proj_to)

    return Transformer(
        _Transformer.from_crs(
            proj_from.crs,
            proj_to.crs,
            skip_equivalent=skip_equivalent,
            always_xy=always_xy,
        )
    )