def METHOD_NAME(self, name: str, default=NoGroupError):
    """
    Get a list of hosts belonging to a group.
    """
    if name in self.groups:
        return self.groups[name]
    if default is NoGroupError:
        raise NoGroupError("No such group: {0}".format(name))
    return default