<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_size(self, name: str, size: int):
 """Set the size of a resource in the RSTB."""

        if self._needs_to_be_in_name_map(name):
            if len(name) >= 128:
                raise ValueError("Name is too long")
            self.name_map[name] = size
        else:
            crc32 = binascii.crc32(name.encode())
            self.crc32_map[crc32] = size