code: def create_registry(interface):
      
      if interface in custom_types:
          raise ValueError('there is already a Registry instance '
                           'for the specified type')
      custom_types[interface] = Registry(interface)
      return interface
docs: 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.