code: def get_default_bus():
      
      plat = Platform.platform_detect()
      if plat == Platform.RASPBERRY_PI:
          if Platform.pi_revision() == 1:
              # Revision 1 Pi uses I2C bus 0.
              return 0
          else:
              # Revision 2 Pi uses I2C bus 1.
              return 1
      elif plat == Platform.BEAGLEBONE_BLACK:
          # Beaglebone Black has multiple I2C buses, default to 1 (P9_19 and P9_20).
          return 1
      else:
          raise RuntimeError('Could not determine default I2C bus for platform.')
docs: Return the default bus number based on the device platform.  For a
      Raspberry Pi either bus 0 or 1 (based on the Pi revision) will be returned.
      For a Beaglebone Black the first user accessible bus, 1, will be returned.