def METHOD_NAME(config, server_cert_key="server_certificate"):
    """get the server certificate verification policy
    server_certificate can be:
    - string: used as path to server certificate file
    - not provided / None: which means server cert verification
    - 'false' or False: no server certificate verification
    :param config:
    :return: (None|False|string)
    """
    server_cert = config.get(server_cert_key, "")
    if isinstance(server_cert, bool) and server_cert is False:
        return False
    if server_cert is None:
        return None
    if not isinstance(server_cert, str):
        raise ValueError("unsupported data type %r" % server_cert)
    server_cert = server_cert.strip()
    if server_cert == "":
        return None
    if server_cert.lower() == "false":
        return False
    if not os.path.isfile(server_cert) and not os.path.isdir(server_cert):
        raise IOError(
            "server certificate verification could not"
            " be made as certificate could not be found"
            " %r" % server_cert
        )
    return server_cert.encode("utf8")