def buffer_size(size):
    """
    Function that uses the concept of currying to help the .map()
    method take more than one argument. The function uses the input
    'size' and call a nested function to create a buffer around the
    centroid of the feature parsed by the .map() method.The geometry
    of the parsed feature is modified in place.

    Parameters
    ----------
    size : int
        Distance of the buffering in meters

    Returns
     -------
     ee.element.Element
         Feature with a buffer of 'size' around its centroid
    """

    def create_buffer(feature):
        """Child function that creates the buffer of 'size' meters"""
        return feature.buffer(size)

    return create_buffer