docs: def from_json_file(schema_file, validate=True):
      # type: (TextIO, bool) -> Schema
      """ Load a Schema object from a json file.
          :param schema_file: A JSON file containing the schema.
          :param validate: (default True) Raise an exception if the
              schema does not conform to the master schema.
          :raises SchemaError: When the schema is invalid.
          :return: the Schema
      """
      try:
          schema_dict = json.load(schema_file)
      except ValueError as e:  # In Python 3 we can be more specific
          # with json.decoder.JSONDecodeError,
          # but that doesn't exist in Python 2.
          msg = 'The schema is not a valid JSON file.'
          raise_from(SchemaError(msg), e)
  
      return from_json_dict(schema_dict, validate=validate)