def record_derivatives(self, derivs, metadata):
        """" Records derivatives if requested.

        Args
        ----
        derivs : dict
            Dictionary containing derivatives
        metadata : dict
            Metadata for iteration coordinate
        """

        metadata['timestamp'] = time.time()

        # If the recorder does not support parallel recording
        # we need to make sure we only record on rank 0.
        for recorder in self._recorders:
            if recorder.options['record_derivs']:
                if recorder._parallel or self.rank == 0:
                    recorder.record_derivatives(derivs, metadata)
dataset/ETHPy150Open OpenMDAO/OpenMDAO/openmdao/recorders/recording_manager.py/RecordingManager.record_derivatives/original