code: def add_segment(self, address, data, overwrite=False):
          
  
          seg_type = self._classify_segment(address, len(data))
          if not isinstance(seg_type, DisjointSegment):
              raise ArgumentError("Unsupported segment type")
  
          segment = MemorySegment(address, address+len(data)-1, len(data), bytearray(data))
          self._segments.append(segment)
docs: Add a contiguous segment of data to this memory map
  
          If the segment overlaps with a segment already added , an
          ArgumentError is raised unless the overwrite flag is True.
  
          Params:
              address (int): The starting address for this segment
              data (bytearray): The data to add
              overwrite (bool): Overwrite data if this segment overlaps
                  with one previously added.