<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_histogram(self, tag, values, global_step=None, bins='default'):
 """Add histogram data to the event file. Note: This function internally calls `asnumpy()` if `values` is an MXNet NDArray. Since `asnumpy()` is a blocking function call, this function would block the main thread till it returns. It may consequently affect the performance of async execution of the MXNet engine. Parameters tag : str Name for the `values`. values : MXNet `NDArray` or `numpy.ndarray` Values for building histogram. global_step : int Global step value to record. bins : int or sequence of scalars or str If `bins` is an int, it defines the number equal-width bins in the range `(values.min(), values.max())`. If `bins` is a sequence, it defines the bin edges, including the rightmost edge, allowing for non-uniform bin width. If `bins` is a str equal to 'default', it will use the bin distribution defined in TensorFlow for building histogram. Ref: https://www.tensorflow.org/programmers_guide/tensorboard_histograms The rest of supported strings for `bins` are 'auto', 'fd', 'doane', 'scott', 'rice', 'sturges', and 'sqrt'. etc. See the documentation of `numpy.histogram` for detailed definitions of those strings. https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html """

        if bins == 'default':
            bins = self._get_default_bins()
        self._file_writer.add_summary(histogram_summary(tag, values, bins), global_step)