def METHOD_NAME(path=None, key=None, sum_type="sha256"):
    """
    Pass in either a raw pem string, or the path on disk to the location of a
    pem file, and the type of cryptographic hash to use. The default is SHA256.
    The fingerprint of the pem will be returned.
    If neither a key nor a path are passed in, a blank string will be returned.
    """
    if not key:
        if not os.path.isfile(path):
            return ""
        with salt.utils.files.fopen(path, "rb") as fp_:
            key = b"".join([x for x in fp_.readlines() if x.strip()][1:-1])
            # We should never have \r\n in a key file. This will cause the
            # finger to be different even though the only difference is the line
            # endings.
            key = key.replace(b"\r\n", b"\n")
    if not isinstance(key, bytes):
        key = key.encode("utf-8")
    pre = getattr(hashlib, sum_type)(key).hexdigest()
    finger = ""
    for ind, _ in enumerate(pre):
        if ind % 2:
            # Is odd
            finger += "{}:".format(pre[ind])
        else:
            finger += pre[ind]
    return finger.rstrip(":")