<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_record(self, sequenced_item):
 """ Constructs a record object from given sequenced item object. """

        kwargs = self.get_field_kwargs(sequenced_item)
        # Supply application_name, if needed.
        if hasattr(self.record_class, 'application_name'):
            kwargs['application_name'] = self.application_name
        # Supply pipeline_id, if needed.
        if hasattr(self.record_class, 'pipeline_id'):
            kwargs['pipeline_id'] = self.pipeline_id
        return self.record_class(**kwargs)