from typing import Dict
from typing import Any


def merge_dict(dict1: Dict[str, Any], dict2: Dict[str, Any]
              ) -> Dict[str, Any]:
  """Merge two dictionaries into a third dictionary.

  Args:
    dict1: First dictionary to be merged.
    dict2: Second dictionary to be merged.

  Returns:
    A dictionary by merging the two dictionaries. Note that if the two
    dictionary has the same keys the value of the latter dictionary will be
    used.
  """
  res = dict1.copy()
  res.update(dict2)
  return res