'Creates a Path instance without the expense of calling the constructor
Parameters
verts : numpy array
codes : numpy array
internals : dict or None
The attributes that the resulting path should have.
Allowed keys are ``readonly``, ``should_simplify``,
``simplify_threshold``, ``has_nonfinite`` and
``interpolation_steps``.'

@classmethod
def _fast_from_codes_and_verts(cls, verts, codes, internals=None):

    internals = (internals or {})
    pth = cls.__new__(cls)
    if isinstance(verts, np.ma.MaskedArray):
        verts = verts.astype(float).filled(np.nan)
    else:
        verts = np.asarray(verts, float)
    pth._vertices = verts
    pth._codes = codes
    pth._readonly = internals.pop(u'readonly', False)
    pth.should_simplify = internals.pop(u'should_simplify', True)
    pth.simplify_threshold = internals.pop(u'simplify_threshold', rcParams[u'path.simplify_threshold'])
    pth._has_nonfinite = internals.pop(u'has_nonfinite', False)
    pth._interpolation_steps = internals.pop(u'interpolation_steps', 1)
    if internals:
        raise ValueError(u'Unexpected    internals    provided    to    _fast_from_codes_and_verts:    {0}'.format(u'\n    *'.join(internals)))
    return pth
