<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_local(self, host="localhost", port=8000):
 """ Connect to a local DynamoDB instance. Use 'local off' to disable. > local > local host=localhost port=8001 > local off """

        port = int(port)
        if host == "off":
            self._local_endpoint = None
        else:
            self._local_endpoint = (host, port)
        self.onecmd("use %s" % self.engine.region)