code: def get_machines_by_groups(self, groups):
          
          if not isinstance(groups, list):
              raise TypeError("groups can only be an instance of type list")
          for a in groups[:10]:
              if not isinstance(a, basestring):
                  raise TypeError(
                          "array can only contain objects of type basestring")
          machines = self._call("getMachinesByGroups",
                       in_p=[groups])
          machines = [IMachine(a) for a in machines]
          return machines
docs: Gets all machine references which are in one of the specified groups.
  
          in groups of type str
              What groups to match. The usual group list rules apply, i.e.
              passing an empty list will match VMs in the toplevel group, likewise
              the empty string.
  
          return machines of type :class:`IMachine`
              All machines which matched.