code: def email_generator(names=None, domains=None, unique=False):
      
      if names is None:
          names = [name.encode('ascii', 'ignore').lower().replace(b' ', b'')
                   for name in ENGLISH_MONARCHS]
      if domains is None:
          domains = DOMAINS
  
      if unique:
          uniquifyer = lambda: str(next(_unique_counter))
      else:
          uniquifyer = lambda: ''
  
      while True:
          yield '{0}{1}@{2}'.format(
              random.choice(names), uniquifyer(), random.choice(domains))
docs: Creates a generator for generating email addresses.
  
      :arg names: list of names to use; defaults to ENGLISH_MONARCHS
          lowercased, ascii-fied, and stripped of whitespace
  
      :arg domains: list of domains to use; defaults to DOMAINS
  
      :arg unique: True if you want the username part of the email
          addresses to be unique
  
      :returns: generator
  
      Example::
  
          from eadred.helpers import email_generator
  
          gen = email_generator()
          for i in range(50):
              mymodel = SomeModel(email=gen.next())
              mymodel.save()
  
  
      Example 2:
  
      >>> gen = email_generator()
      >>> gen.next()
      'eadwig@example.net'
      >>> gen.next()
      'henrybeauclerc@mail1.example.org'
      >>> gen.next()
      'williamrufus@example.com'