def METHOD_NAME (bios_data, platform_data = None):
    if platform_data:
        # Parse BIOS image
        ifwi_parser = IFWI_PARSER ()
        bios = ifwi_parser.parse_ifwi_binary (bios_data)
        if not bios:
            return None
        for part in range(2):
          path = 'IFWI/BIOS/TS%d/SG1A' % part
          stage1A = ifwi_parser.locate_component (bios, path)
          if stage1A:
              plat_data_offset = stage1A.offset + stage1A.length - 12
              c_uint32.from_buffer (bios_data, plat_data_offset).value = platform_data
          print("Platform data was patched for %s" % path)
    return bios_data