def METHOD_NAME(self, obj):
    site_coordinates = "{latitude}, {longitude}".format(
        latitude=round(obj.geometry_point.x, 3),
        longitude=round(obj.geometry_point.y, 3))
    def parse_string(string_in):
        return "Unknown" if not string_in else string_in
    site_detail_info = {
        'site_code': parse_string(obj.site_code),
        'site_coordinates': parse_string(site_coordinates),
        'site_description': parse_string(obj.site_description),
    }
    if preferences.SiteSetting.site_code_generator == 'fbis':
        try:
            if obj.legacy_river_name:
                site_detail_info['river'] = parse_string(
                    obj.legacy_river_name)
            else:
                site_detail_info['river'] = parse_string(obj.river.name)
        except AttributeError:
            site_detail_info['river'] = 'Unknown'
    return site_detail_info