<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def load(file,line=None,options={},block=None):
    ''' Create a new template for the given file using the file's extension
        to determine the the template mapping.
    '''

    template_class = Lean.get_template(file)
    if template_class:
      return template_class(file,line,options,block)
    else:
      raise LookupError('No template engine registered for ' + os.path.basename(file))