def recon_rule_preview_payload(passed_keywords: dict) -> dict:
    """Create a properly formatted payload for retrieving a rule preview from recon.

    {
        "filter": "string",
        "topic": "string"
    }
    """
    returned_payload = {}
    if passed_keywords.get("filter", None):
        returned_payload["filter"] = passed_keywords.get("filter", None)
    if passed_keywords.get("topic", None):
        returned_payload["topic"] = passed_keywords.get("topic", None)

    return returned_payload