<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_java_container(self, package_name=None, object_name=None, java_class_instance=None):
 """Convenience method to get the container that houses methods we wish to call a method on. """

        if package_name is not None:
            jcontainer = self.import_scala_package_object(package_name)
        elif object_name is not None:
            jcontainer = self.import_scala_object(object_name)
        elif java_class_instance is not None:
            jcontainer = java_class_instance
        else:
            raise RuntimeError("Expected one of package_name, object_name or java_class_instance")
        return jcontainer