code: def fix_addresses(start=None, end=None):
      
      if start in (None, idaapi.BADADDR):
          start = idaapi.cvar.inf.minEA
  
      if end in (None, idaapi.BADADDR):
          end = idaapi.cvar.inf.maxEA
  
      return start, end
docs: Set missing addresses to start and end of IDB.
  
      Take a start and end addresses. If an address is None or `BADADDR`,
      return start or end addresses of the IDB instead.
  
      Args
          start: Start EA. Use `None` to get IDB start.
          end:  End EA. Use `None` to get IDB end.
  
      Returns:
          (start, end)