code: def get_linked_deployments(deployments: Dict[str, Any]) -> Dict[str, Any]:
      
      linked_deployments = {
          dep: data
          for dep, data in deployments.items()
          if get_in(("runtime_bytecode", "link_dependencies"), data)
      }
      for deployment, data in linked_deployments.items():
          if any(
              link_dep["value"] == deployment
              for link_dep in data["runtime_bytecode"]["link_dependencies"]
          ):
              raise BytecodeLinkingError(
                  f"Link dependency found in {deployment} deployment that references its "
                  "own contract instance, which is disallowed"
              )
      return linked_deployments
docs: Returns all deployments found in a chain URI's deployment data that contain link dependencies.