<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def map(self, value=NONE):
 """ Executes the steps used to "map" this fields value from `ctx.src` to a value. :param value: optional **pre-computed** value. :return: The successfully mapped value or: - NONE if one was not found - ERROR if the field was present in `ctx.src` but invalid. """

        with self.ctx(field=self, parent=self):
            value = self._map(value)
        if self.attach_parent and value not in IGNORE:
            if hasattr(self.ctx, 'parent'):
                value.parent = weakref.proxy(self.ctx.parent)
            else:
                value.parent = None
        return value