<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_extension(extension):
 """ Look up the BioPython file type corresponding with input extension. Look up is case insensitive. """

    if not extension.startswith('.'):
        raise ValueError("Extensions must begin with a period.")
    try:
        return EXTENSION_TO_TYPE[extension.lower()]
    except KeyError:
        raise UnknownExtensionError(
            "seqmagick does not know how to handle " +
            "files with extensions like this: " + extension)