code: def create_registry(interface):
      """
      Create a new registry for an extensible interface.
  
      Parameters
      ----------
      interface : type
          The abstract data type for which to create a registry,
          which will manage registration of factories for this type.
  
      Returns
      -------
      interface : type
          The data type specified/decorated, unaltered.
      """
      if interface in custom_types:
          raise ValueError(
              "there is already a Registry instance "
              "for the specified type"
          )
      custom_types[interface] = Registry(interface)
      return interface
  
imports: import re
  import six
  from toolz import curry
label_desc: Use image node_id 9 for calling a global function with example usage: create_registry(interface) and returns: interface