from typing import Tuple
from typing import Dict
from typing import Any


def postprocess_fbound(
  smfb_0: float, smfb_1: float
) -> Tuple[Dict[str, Any], Dict[str, Any]]:
  """Postprocess frequency bounds

  Args:
    smfb_0 (float): Lower bound
    smfb_1 (float): Upper bound

  Returns:
    dict, dict: Postprocessed settings and parameters as dictionaries"""
  if smfb_0 > smfb_1:
    smfb_0, smfb_1 = (smfb_1, smfb_0)
  elif smfb_0 == smfb_1:
    smfb_0 = 20
    smfb_1 = 16000
  in_kw = dict(
    smfb_0=smfb_0,
    smfb_1=smfb_1,
  )
  out_kw = dict(
    sinusoidal_model__frequency_bounds=(
      smfb_0, smfb_1
    )
  )
  return in_kw, out_kw