def checkForOverlappingGrants(grant, frequency_range):
  """Returns True if a grant overlaps with a given frequency range.

  If the lowFrequency or the highFrequency of the grant falls within the
  low and high frequencies of the given range then the grant is considered
  to be overlapping.

  Args:
    grant: A |GrantData| object dictionary defined in SAS-SAS spec
    frequency_range: The frequency range in Hz as a dictionary with keys
       'lowFrequency' and 'highFrequency'.
  """
  low_frequency_cbsd = grant['operationParam']['operationFrequencyRange']['lowFrequency']
  high_frequency_cbsd = grant['operationParam']['operationFrequencyRange']['highFrequency']
  low_frequency = frequency_range['lowFrequency']
  high_frequency = frequency_range['highFrequency']
  assert low_frequency_cbsd < high_frequency_cbsd
  assert low_frequency < high_frequency
  return ((low_frequency_cbsd < high_frequency) and
          (low_frequency < high_frequency_cbsd))