'Return a filename of a file containing a binary representation of
target.  If no such file exists, make one.'

def _target_filename(self, target):

    target_filename = self._target_filenames.get(target)
    if (target_filename is None):
        target_filename = os.path.join(self.out_dir, 'labels', (str(target) + '.txt'))
        ensure_dirs_exist(target_filename)
        np.savetxt(target_filename, [target], '%d')
        self._target_filenames[target] = target_filename
    return target_filename
