<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply(self, **kwargs):
 """Return a new FeatureCollection with the results of applying the statements in the arguments to each element. """

        def _apply(f):
            properties = copy.deepcopy(f.properties)
            for prop, value in kwargs.items():
                if callable(value):
                    properties[prop] = value(f)
                else:
                    properties[prop] = value

            return f.copy_with(properties=properties)
        new_fc = self.map(_apply)
        new_schema = self.schema.copy()
        property_names_set = kwargs.keys()
        prop_types_map = FeatureCollection.guess_types_by_feature(new_fc[0], property_names_set)
        for key, value_type in prop_types_map.items():
            # already defined attribute that we just override will have the same position as before
            # new attributes will be appened
            new_schema["properties"][key] = FIELD_TYPES_MAP_REV.get(value_type, 'str')
        new_fc._schema = new_schema
        return new_fc