code: def _out(self, allow_placeholders):
          
          return '\n'.join(itertools.chain(
              (dg.out() for dg in self._defined_gates),
              (instr.out(allow_placeholders=allow_placeholders) for instr in self.instructions),
              [''],
          ))
docs: Converts the Quil program to a readable string.
  
          :param allow_placeholders: Whether to complain if the program contains placeholders.