input: 
  from typing import Dict
  
  
  def calculate_sum(dictionary: Dict[str, int]) -> int:
      """ Given a dictionary with integer values for keys 'x' and 'y',
      calculate and return their sum. If the dictionary does not contain
      the keys 'x' and 'y', or their values are not integers, return 0.
      
      >>> calculate_sum({'x': 5, 'y': 3})
      8
      >>> calculate_sum({'x': 10, 'y': -5})
      5
      >>> calculate_sum({'x': 7})
      0
      >>> calculate_sum({'a': 1, 'b': 2})
      0
      """
  
output:     if 'x' not in dictionary or 'y' not in dictionary:
          return 0
      if not isinstance(dictionary['x'], int) or not isinstance(dictionary['y'], int):
          return 0
      return dictionary['x'] + dictionary['y']