How to tell whether Object is a duplicate?
It's possible to check the vertices of both meshes via unit_test_compare for a first quick test:

import bpy

first_obj = bpy.data.objects['Cube']
first_obj_mesh = first_obj.data

second_obj = bpy.data.objects['Suzanne']
second_obj_mesh = second_obj.data

print(first_obj_mesh.unit_test_compare(second_obj_mesh))


Console Output: 


  Number of verts don't match




For Linked Duplicates iterate through the mesh objects in the scene and check if mesh data block is associated with multiple objects:

import bpy

obj = bpy.data.objects['Cube']
obj_mesh = obj.data

mesh_dict = {}
for i in bpy.data.objects:
    if i.type == 'MESH':
        mesh_dict.setdefault(i.data, []).append(i)

print(mesh_dict[obj_mesh])




Note: Of course, it's always possible to compare the geometry, even if it would take long time for calculation and a bit of math, depending on your requirements.