def canonicalizeName(name, mech_type):
    """
    Canonicalizes a GSSAPI Name into a Mechanism Name

    This method turns any GSSAPI name into a "mechanism name",
    i.e. a name that would be returned as initator principal
    from acceptSecContext.

    .. warning::

       Unlike other methods, a mechanism type must be explicitly provided here;
       No default is available for this method.

    :param name: the GSSAPI name to canonicalize
    :param mech_type: the mechanism type
    :type mech_type: :class:`gssapi.base.types.MechType`
    :returns: a canonicalized name
    :rtype: PyCapsule
    :except GSSError:
    """
