<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def action_analyze(sources,
 endpoint=None,
 print_opts=False,
 verbose=False,
 extra=False,
 raw=False):

 """
 Load up a model into ontospy and analyze it
 """

    for x in sources:
        click.secho("Parsing %s..." % str(x), fg='white')

    if extra:
        hide_base_schemas = False
        hide_implicit_types = False
        hide_implicit_preds = False
    else:
        hide_base_schemas = True
        hide_implicit_types = True
        hide_implicit_preds = True

    if raw:
        o = Ontospy(uri_or_path=sources, verbose=verbose, build_all=False)
        s = o.serialize()
        print(s)
        return
    elif endpoint:
        g = Ontospy(
            sparql_endpoint=sources[0],
            verbose=verbose,
            hide_base_schemas=hide_base_schemas,
            hide_implicit_types=hide_implicit_types,
            hide_implicit_preds=hide_implicit_preds)
        printDebug("Extracting classes info")
        g.build_classes()
        printDebug("..done")
        printDebug("Extracting properties info")
        g.build_properties()
        printDebug("..done")
    else:
        g = Ontospy(
            uri_or_path=sources,
            verbose=verbose,
            hide_base_schemas=hide_base_schemas,
            hide_implicit_types=hide_implicit_types,
            hide_implicit_preds=hide_implicit_preds)

    shellPrintOverview(g, print_opts)