def get_snapshots(self, domains=None):
snapshots = {}<EOL>for vm_name, vm in self.get_vms().items():<EOL><INDENT>if domains and vm_name not in domains:<EOL><INDENT>continue<EOL><DEDENT>snapshots[vm_name] = vm._spec['<STR_LIT>']<EOL><DEDENT>return snapshots<EOL>
Get the list of snapshots for each domain
Args:
    domanins(list of str): list of the domains to get the snapshots
    for, all will be returned if none or empty list passed
Returns:
    dict of str -> list(str): with the domain names and the list of
    snapshots for each