def memory(self, name, mem=0, swap=0):
        """
        Set/Get memory cgroup specification/limitation
        the call to this method will always GET the current set values for both mem and swap.
        If mem is not zero, the memory will set the memory limit to the given value, and swap to the given value (even 0)

        :param mem: Set memory limit to the given value (in bytes), ignore if 0
        :param swap: Set swap limit to the given value (in bytes) (only if mem is not zero)

        :return: current memory limitation
        """

        args = {
            'name': name,
            'mem': mem,
            'swap': swap,
        }

        self._memory_spec.check(args)
        return self._client.json('cgroup.memory.spec', args)
Set/Get memory cgroup specification/limitation
        the call to this method will always GET the current set values for both mem and swap.
        If mem is not zero, the memory will set the memory limit to the given value, and swap to the given value (even 0)

        :param mem: Set memory limit to the given value (in bytes), ignore if 0
        :param swap: Set swap limit to the given value (in bytes) (only if mem is not zero)

        :return: current memory limitation