code: def is_calculated_aes(ae):
      
      if not isinstance(ae, str):
          return False
  
      for pattern in (STAT_RE, DOTS_RE):
          if pattern.search(ae):
              return True
  
      return False
docs: Return a True if of the aesthetics that are calculated
  
      Parameters
      ----------
      ae : object
          Aesthetic mapping
  
      >>> is_calculated_aes('density')
      False
  
      >>> is_calculated_aes(4)
      False
  
      >>> is_calculated_aes('..density..')
      True
  
      >>> is_calculated_aes('stat(density)')
      True
  
      >>> is_calculated_aes('stat(100*density)')
      True
  
      >>> is_calculated_aes('100*stat(density)')
      True