<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def makesubatoffset(self, bitoffset, *, _offsetideal=None):
 """Create a copy of this PromiseCollection with an offset applied to each contained promise and register each with their parent. If this promise's primitive is being merged with another primitive, a new subpromise may be required to keep track of the new offset of data coming from the new primitive. Args: bitoffset: An integer offset of the data in the new primitive. _offsetideal: An integer offset to use if the associated primitive supports arbitrary TDO control. Returns: A new TDOPromiseCollection registered with this promise collection, and with the correct offset. """

        if _offsetideal is None:
            _offsetideal = bitoffset
        if bitoffset is 0:
            return self
        newpromise = TDOPromiseCollection(self._chain)
        for promise in self._promises:
            newpromise.add(promise, bitoffset, _offsetideal=_offsetideal)
        return newpromise