code: def xyz_with_ports(self):
          
          if not self.children:
              pos = self._pos
          else:
              arr = np.fromiter(
                  itertools.chain.from_iterable(
                      particle.pos for particle in self.particles(
                          include_ports=True)), dtype=float)
              pos = arr.reshape((-1, 3))
          return pos
docs: Return all particle coordinates in this compound including ports.
  
          Returns
          -------
          pos : np.ndarray, shape=(n, 3), dtype=float
              Array with the positions of all particles and ports.