def create_ctm_miohandler(fileobj, title=None, comment=None, register_prefixes=True, register_templates=True, detect_prefixes=False):
    """\

    """
    handler = CTMHandler(fileobj)
    handler.title = title
    handler.comment = comment
    handler.detect_prefixes = detect_prefixes
    if register_prefixes:
        register_default_prefixes(handler)
    if register_templates:
        handler.add_association_template(u'classified', psis.CLASSIFIED_AS_TYPE, psis.CABLE_TYPE, psis.CLASSIFICATION_TYPE)
        handler.add_association_template(u'origin', psis.SENT_BY_TYPE, psis.CABLE_TYPE, psis.SENDER_TYPE)
        handler.add_association_template(u'references', psis.REFERENCES_TYPE, psis.SOURCE_TYPE, psis.TARGET_TYPE)
        handler.add_association_template(u'to', psis.RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE)
        handler.add_association_template(u'to', psis.RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE, psis.ROUTE_TYPE)
        handler.add_association_template(u'to', psis.RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE, psis.ROUTE_TYPE, psis.PRECEDENCE_TYPE)
        handler.add_association_template(u'to', psis.RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE, psis.ROUTE_TYPE, psis.PRECEDENCE_TYPE, psis.MCN_TYPE)
        handler.add_association_template(u'info', psis.INFO_RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE)
        handler.add_association_template(u'info', psis.INFO_RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE, psis.ROUTE_TYPE)
        handler.add_association_template(u'info', psis.INFO_RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE, psis.ROUTE_TYPE, psis.PRECEDENCE_TYPE)
        handler.add_association_template(u'info', psis.INFO_RECIPIENT_TYPE, psis.CABLE_TYPE, psis.RECIPIENT_TYPE, psis.ROUTE_TYPE, psis.PRECEDENCE_TYPE, psis.MCN_TYPE)
        handler.add_association_template(u'tagged', psis.TAGGED_TYPE, psis.CABLE_TYPE, psis.TAG_TYPE)
        handler.add_association_template(u'is-partial', psis.IS_PARTIAL_TYPE, psis.PARTIAL_TYPE)
        handler.add_association_template(u'signed-by', psis.SIGNED_TYPE, psis.CABLE_TYPE, psis.SIGNER_TYPE)
    return handler
\