code: def list_all_eq_to(list_, val, strict=True):
      if util_type.HAVE_NUMPY and isinstance(val, np.ndarray):
          return all([np.all(item == val) for item in list_])
      try:
          with warnings.catch_warnings():
              warnings.filterwarnings('ignore', category=FutureWarning)
              flags = [item == val for item in list_]
              return all([np.all(flag) if hasattr(flag, '__array__') else flag
                          for flag in flags])
      except ValueError:
          if not strict:
              return all([repr(item) == repr(val) for item in list_])
          else:
              raise