old_contents: """
  CheckiOReferee is a base referee for checking you code.
      arguments:
          tests -- the dict contains tests in the specific structure.
              You can find an example in tests.py.
          cover_code -- is a wrapper for the user function and additional operations before give data
              in the user function. You can use some predefined codes from checkio.referee.cover_codes
          checker -- is replacement for the default checking of an user function result. If given, then
              instead simple "==" will be using the checker function which return tuple with result
              (false or true) and some additional info (some message).
              You can use some predefined codes from checkio.referee.checkers
          add_allowed_modules -- additional module which will be allowed for your task.
          add_close_builtins -- some closed builtin words, as example, if you want, you can close "eval"
          remove_allowed_modules -- close standard library modules, as example "math"
  
  checkio.referee.checkers
      checkers.float_comparison -- Checking function fabric for check result with float numbers.
          Syntax: checkers.float_comparison(digits) -- where "digits" is a quantity of significant
              digits after coma.
  
  checkio.referee.cover_codes
      cover_codes.unwrap_args -- Your "input" from test can be given as a list. if you want unwrap this
          before user function calling, then using this function. For example: if your test's input
          is [2, 2] and you use this cover_code, then user function will be called as checkio(2, 2)
      cover_codes.unwrap_kwargs -- the same as unwrap_kwargs, but unwrap dict.
  
  """
  
  from checkio.signals import ON_CONNECT
  from checkio import api
  from checkio.referees.io import CheckiOReferee
  from checkio.referees import cover_codes
  from checkio.referees import checkers
  
  from tests import TESTS
  
  TYPE_ERROR = False, {"error_code": 1, "message": "You should return a callable function."}
  ALL_OK = True, {"error_code": 100,
                  "message": "All ok."}
  
  def check_data(answer_data, user_data):
      if not hasattr(user_data,'__call__'):
          return TYPE_ERROR
      return ALL_OK
  
  api.add_listener(
      ON_CONNECT,
      CheckiOReferee(
          tests=TESTS,
          cover_code={
              'python-27': cover,
              'python-3': cover
          },
          # checker=None,  # checkers.float.comparison(2)
          checker=check_data
          # add_allowed_modules=[],
          # add_close_builtins=[],
          # remove_allowed_modules=[]
      ).on_ready)
  
new_contents: """
  CheckiOReferee is a base referee for checking you code.
      arguments:
          tests -- the dict contains tests in the specific structure.
              You can find an example in tests.py.
          cover_code -- is a wrapper for the user function and additional operations before give data
              in the user function. You can use some predefined codes from checkio.referee.cover_codes
          checker -- is replacement for the default checking of an user function result. If given, then
              instead simple "==" will be using the checker function which return tuple with result
              (false or true) and some additional info (some message).
              You can use some predefined codes from checkio.referee.checkers
          add_allowed_modules -- additional module which will be allowed for your task.
          add_close_builtins -- some closed builtin words, as example, if you want, you can close "eval"
          remove_allowed_modules -- close standard library modules, as example "math"
  
  checkio.referee.checkers
      checkers.float_comparison -- Checking function fabric for check result with float numbers.
          Syntax: checkers.float_comparison(digits) -- where "digits" is a quantity of significant
              digits after coma.
  
  checkio.referee.cover_codes
      cover_codes.unwrap_args -- Your "input" from test can be given as a list. if you want unwrap this
          before user function calling, then using this function. For example: if your test's input
          is [2, 2] and you use this cover_code, then user function will be called as checkio(2, 2)
      cover_codes.unwrap_kwargs -- the same as unwrap_kwargs, but unwrap dict.
  
  """
  
  from checkio.signals import ON_CONNECT
  from checkio import api
  from checkio.referees.io import CheckiOReferee
  from checkio.referees import cover_codes
  from checkio.referees import checkers
  
  from tests import TESTS
  
  TYPE_ERROR = False, {"error_code": 1, "message": "You should return a callable function."}
  ALL_OK = True, {"error_code": 100,
                  "message": "All ok."}
  
  def check_data(answer_data, user_data):
      if not hasattr(user_data,'__call__'):
          return TYPE_ERROR
      return ALL_OK
  
  api.add_listener(
      ON_CONNECT,
      CheckiOReferee(
          tests=TESTS,
          #cover_code={
          #    'python-27': cover,
          #    'python-3': cover
          #},
          # checker=None,  # checkers.float.comparison(2)
          checker=check_data
          # add_allowed_modules=[],
          # add_close_builtins=[],
          # remove_allowed_modules=[]
      ).on_ready)
  
subject: Update referee.py