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.')
Gets headlines from the markdown document and creates anchor tags.
dataset/ETHPy150Open adafruit/Adafruit_Python_GPIO/Adafruit_GPIO/I2C.py/get_default_bus--crossover with--dataset/ETHPy150Open phodal/awesome-iot/toc.py/tag_and_collect