code: def is_magic(s):
      
      if not is_identifier(s):
          return False
      return len(s) > 4 and s.startswith('__') and s.endswith('__')
docs: Check whether given string is a __magic__ Python identifier.
      :return: Whether ``s`` is a __magic__ Python identifier