human
Complete this python program:
def get_component_templates(courselike, library=False):
assistant
#Here is the Python code you requested.

    """Returns the applicable component templates that can be used by the specified course or library.
    """
    def create_template_dict(name, category, support_level, boilerplate_name=None, tab='common', hinted=False):
        '\n                                Creates    a    component    template    dict.\n\n                                Parameters\n                                                display_name:    the    user-visible    name    of    the    component\n                                                category:    the    type    of    component    (problem,    html,    etc.)\n                                                support_level:    the    support    level    of    this    component\n                                                boilerplate_name:    name    of    boilerplate    for    filling    in    default    values.    May    be    None.\n                                                hinted:    True    if    hinted    problem    else    False\n                                                tab:    common(default)/advanced,    which    tab    it    goes    in\n\n                                '
        return {'display_name': name, 'category': category, 'boilerplate_name': boilerplate_name, 'hinted': hinted, 'tab': tab, 'support_level': support_level}
    def component_support_level(editable_types, name, template=None):
        '\n                                Returns    the    support    level    for    the    given    xblock    name/template    combination.\n\n                                Args:\n                                                editable_types:    a    QuerySet    of    xblocks    with    their    support    levels\n                                                name:    the    name    of    the    xblock\n                                                template:    optional    template    for    the    xblock\n\n                                Returns:\n                                                If    XBlockStudioConfigurationFlag    is    enabled,    returns    the    support    level\n                                                (see   ...