def render(self, context):
        # Get the gizmos rendered from the context
        gizmos_rendered = context['gizmos_rendered']

        # Compile list of unique gizmo dependencies
        dependencies = []

        # Add gizmo dependencies
        for rendered_gizmo in gizmos_rendered:
            try:
                # Retrieve the "gizmo_dependencies" module and find the appropriate function
                dependencies_module = __import__('tethys_gizmos.gizmo_dependencies', fromlist=[rendered_gizmo])
                dependencies_function = getattr(dependencies_module, rendered_gizmo)

                # Retrieve a list of dependencies for the gizmo
                gizmo_deps = dependencies_function(context)

                # Only append dependencies if they do not already exist
                for dependency in gizmo_deps:
                    if EXTERNAL_INDICATOR in dependency:
                        static_url = dependency
                    else:
                        static_url = static(dependency)

                    if static_url not in dependencies:
                        # Lookup the static url given the path
                        dependencies.append(static_url)

            except __HOLE__:
                # Skip those that do not have dependencies
                pass

        # Add the global dependencies last
        for dependency in global_dependencies(context):
            if EXTERNAL_INDICATOR in dependency:
                static_url = dependency
            else:
                static_url = static(dependency)

            if static_url not in dependencies:
                # Lookup the static url given the path
                dependencies.append(static_url)

        # Create markup tags
        script_tags = []
        style_tags = []
        for dependency in dependencies:
            # Only process Script tags if the dependency has a ".js" extension and the output type is JS or not specified
            if JS_EXTENSION in dependency and (self.output_type == JS_OUTPUT_TYPE or self.output_type is None):
                script_tags.append('<script src="{0}" type="text/javascript"></script>'.format(dependency))

            # Only process Style tags if the dependency has a ".css" extension and the output type is CSS or not specified
            elif CSS_EXTENSION in dependency and (self.output_type == CSS_OUTPUT_TYPE or self.output_type is None):
                style_tags.append('<link href="{0}" rel="stylesheet" />'.format(dependency))

        # Combine all tags
        tags = style_tags + script_tags
        tags_string = '\n'.join(tags)
        return tags_string
dataset/ETHPy150Open tethysplatform/tethys/tethys_gizmos/templatetags/tethys_gizmos.py/TethysGizmoDependenciesNode.render