code: def _check_format(instance_list, namespace=None):
      """Quick check of an instance list to see if the format is correct."""
      if namespace is None:
          namespace = []
      # Assert list instance
      if not isinstance(instance_list, list):
          return False
  
      # If empty list, no preprocessing case
      if not instance_list:
          return True
  
      # Check if each element in instance_list is a named instance tuple
      for element in instance_list:
          # Check that element is a tuple
          if not isinstance(element, tuple) or len(element) != 2:
              return False
  
          # Check tuple
          is_str = isinstance(element[0], str)
          no_spa = " " not in element[0]
          no_dup = element[0] not in namespace
  
          is_est = hasattr(element[1], "get_params") and hasattr(
              element[1], "fit"
          )
  
          if not (is_str and is_est and no_dup and no_spa):
              return False
  
          # Check that the last element is a valid estimator
          assert_valid_estimator(element[1])
  
      # Check that there are no duplicate names
      names = Counter([tup[0] for tup in instance_list])
      if max([val for val in names.values()]) > 1:
          return False
  
      # If instances passes above criterion, it's correctly specified
      return True
  
file_path: mlens/mlens/utils/formatting.py
imports: from __future__ import division, print_function
  from collections import Counter
  from .checks import assert_valid_estimator, assert_correct_format
  from .exceptions import LayerSpecificationError
  from ..externals.sklearn.base import clone
label_desc: Use image node_id 3 for calling a global function with example usage: _check_format(instance_list, namespace) and returns: True, False, True, False, False, False