code: def populate_sites( self, number_of_atoms, selected_sites=None ):
          
          if number_of_atoms > self.number_of_sites:
              raise ValueError
          if selected_sites:
              atoms = [ atom.Atom( initial_site = site ) for site in random.sample( [ s for s in self.sites if s.label in selected_sites ], number_of_atoms ) ]
          else:
              atoms = [ atom.Atom( initial_site = site ) for site in random.sample( self.sites, number_of_atoms ) ]
          self.number_of_occupied_sites = number_of_atoms
          return atoms
docs: Populate the lattice sites with a specific number of atoms.
  
          Args:
              number_of_atoms (Int): The number of atoms to populate the lattice sites with.
              selected_sites (:obj:List, optional): List of site labels if only some sites are to be occupied. Defaults to None.
  
          Returns:
              None