<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logs(self, pod=None):
 """ Logs from a worker pod You can get this pod object from the ``pods`` method. If no pod is specified all pod logs will be returned. On large clusters this could end up being rather large. Parameters pod: kubernetes.client.V1Pod The pod from which we want to collect logs. See Also -------- KubeCluster.pods Client.get_worker_logs """

        if pod is None:
            return {pod.status.pod_ip: self.logs(pod) for pod in self.pods()}

        return self.core_api.read_namespaced_pod_log(pod.metadata.name,
                                                     pod.metadata.namespace)