def port(container, private_port):
 status = base_status.copy()
 client = _get_client()
 try:
  port_info = client.port(_get_container_infos(container)['Id'], private_port)
  _valid(status, id_=container, out=port_info)
 except Exception:
  _invalid(status, id_=container, out=traceback.format_exc())
 return status

def port ( container , private_port ) : status = base_status . copy ( ) client = _get_client ( ) try : port_info = client . port ( _get_container_infos ( container ) [ 'Id' ] , private_port ) _valid ( status , id_ = container , out = port_info ) except Exception : _invalid ( status , id_ = container , out = traceback . format_exc ( ) ) return status
returns port mapping information for a given container .