<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_class(self, instance, name=None):
 """Add all functions of a class-instance to the RPC-services. All entries of the instance which do not begin with '_' are added. :Parameters: - myinst: class-instance containing the functions - name: | hierarchical prefix. | If omitted, the functions are added directly. | If given, the functions are added as "name.function". :TODO: - only add functions and omit attributes? - improve hierarchy? """

        prefix_name = name or instance.__class__.__name__

        for e in dir(instance):
            if e[0][0] != "_":
                self.register_function(
                    getattr(instance, e),
                    name="%s.%s" % (prefix_name, e)
                )