@spec keys_with_path(map(), any()) :: list()
@spec opts_to_map(maybe_improper_list() | map()) :: any()