def _check_unpack_options(extensions, function, extra_args):
 existing_extensions = {}
 for (name, info) in _UNPACK_FORMATS.items():
  for ext in info[0]:
   existing_extensions[ext] = name
 for extension in extensions:
  if (extension in existing_extensions):
   msg = '%s is already registered for "%s"'
   raise RegistryError((msg % (extension, existing_extensions[extension])))
 if (not isinstance(function, collections.Callable)):
  raise TypeError('The registered function must be a callable')

def _check_unpack_options ( extensions , function , extra_args ) : existing_extensions = { } for ( name , info ) in _UNPACK_FORMATS . items ( ) : for ext in info [ 0 ] : existing_extensions [ ext ] = name for extension in extensions : if ( extension in existing_extensions ) : msg = '%s is already registered for "%s"' raise RegistryError ( ( msg % ( extension , existing_extensions [ extension ] ) ) ) if ( not isinstance ( function , collections . Callable ) ) : raise TypeError ( 'The registered function must be a callable' )
checks what gets registered as an unpacker .