def is_logs_synced(mst, slv):

    """Function:  is_logs_synced

    Description:  Checks to see if the Master binary log file name and log
        position match that the Slave's Relay log file name and log position.

    Arguments:
        (input) mst -> Master instance.
        (input) slv -> Slave instance.
        (output) True or False -> True is return if logs are in sync.

    """

    is_synced = True

    if mst.gtid_mode and slv.gtid_mode:
        if mst.exe_gtid != slv.exe_gtid:
            is_synced = False

    # Non-GTID server.
    else:
        if mst.file != slv.relay_mst_log or mst.pos != slv.exec_mst_pos:
            is_synced = False

    return is_synced