<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _format(self, serie, i):
 """Format the nth value for the serie"""

        value = serie.values[i]
        metadata = serie.metadata.get(i)

        kwargs = {'chart': self, 'serie': serie, 'index': i}
        formatter = ((metadata and metadata.get('formatter'))
                     or serie.formatter or self.formatter
                     or self._value_format)
        kwargs = filter_kwargs(formatter, kwargs)
        return formatter(value, **kwargs)