<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
Step1:  Adding all icons in a single call
Step2:  Explicit loop allow for customization in the loop.
Step4:  FastMarkerCluster is not as flexible as MarkerCluster but, like the name suggests, it is faster.
<ASSISTANT_TASK:>
Python Code:
icon_create_function = \
function(cluster) {
    return L.divIcon({
    html: '<b>' + cluster.getChildCount() + '</b>',
    className: 'marker-cluster marker-cluster-large',
    iconSize: new L.Point(20, 20)
    });
}
from folium.plugins import MarkerCluster
m = folium.Map(
    location=[np.mean(lats), np.mean(lons)], tiles="Cartodb Positron", zoom_start=1
)
marker_cluster = MarkerCluster(
    locations=locations,
    popups=popups,
    name="1000 clustered icons",
    overlay=True,
    control=True,
    icon_create_function=icon_create_function,
)
marker_cluster.add_to(m)
folium.LayerControl().add_to(m)
m
Explanation: Adding all icons in a single call
End of explanation
%%time
m = folium.Map(
    location=[np.mean(lats), np.mean(lons)],
    tiles='Cartodb Positron',
    zoom_start=1
)
marker_cluster = MarkerCluster(
    name='1000 clustered icons',
    overlay=True,
    control=False,
    icon_create_function=None
)
for k in range(size):
    location = lats[k], lons[k]
    marker = folium.Marker(location=location)
    popup = 'lon:{}<br>lat:{}'.format(location[1], location[0])
    folium.Popup(popup).add_to(marker)
    marker_cluster.add_child(marker)
marker_cluster.add_to(m)
folium.LayerControl().add_to(m);
m
Explanation: Explicit loop allow for customization in the loop.
End of explanation
from folium.plugins import FastMarkerCluster
%%time
m = folium.Map(
    location=[np.mean(lats), np.mean(lons)],
    tiles='Cartodb Positron',
    zoom_start=1
)
FastMarkerCluster(data=list(zip(lats, lons))).add_to(m)
folium.LayerControl().add_to(m);
m
callback = \
function (row) {
    var icon, marker;
    icon = L.AwesomeMarkers.icon({
        icon: "map-marker", markerColor: "red"});
    marker = L.marker(new L.LatLng(row[0], row[1]));
    marker.setIcon(icon);
    return marker;
};
m = folium.Map(
    location=[np.mean(lats), np.mean(lons)], tiles="Cartodb Positron", zoom_start=1
)
FastMarkerCluster(data=list(zip(lats, lons)), callback=callback).add_to(m)
m
Explanation: FastMarkerCluster is not as flexible as MarkerCluster but, like the name suggests, it is faster.
End of explanation
<END_TASK>