You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
What is Leech and explain in detail?
Leeches are segmented parasitic or predatory worms that comprise the subclass Hirudinea within the phylum Annelida. They are closely related to the oligochaetes, which include the earthworm, and like them have soft, muscular segmented bodies that can lengthen and contract. Both groups are hermaphrodites and have a clitellum, but leeches typically differ from the oligochaetes in having suckers at both ends and in having ring markings that do not correspond with their internal segmentation. The body is muscular and relatively solid, and the coelom, the spacious body cavity found in other annelids, is reduced to small channels.
The majority of leeches live in freshwater habitats, while some species can be found in terrestrial or marine environments. The best-known species, such as the medicinal leech, Hirudo medicinalis, are hematophagous, attaching themselves to a host with a sucker and feeding on blood, having first secreted the peptide hirudin to prevent the blood from clotting. The jaws used to pierce the skin are replaced in other species by a proboscis which is pushed into the skin. A minority of leech species are predatory, mostly preying on small invertebrates.
The eggs are enclosed in a cocoon, which in aquatic species is usually attached to an underwater surface; members of one family, Glossiphoniidae, exhibit parental care, the eggs being brooded by the parent. In terrestrial species, the cocoon is often concealed under a log, in a crevice or buried in damp soil. Almost seven hundred species of leech are currently recognised, of which some hundred are marine, ninety terrestrial and the remainder freshwater.
Leeches have been used in medicine from ancient times until the 19th century to draw blood from patients. In modern times, leeches find medical use in treatment of joint diseases such as epicondylitis and osteoarthritis, extremity vein diseases, and in microsurgery, while hirudin is used as an anticoagulant drug to treat blood-clotting disorders.

Diversity and phylogeny
Some 680 species of leech have been described, of which around 100 are marine, 480 freshwater and the remainder terrestrial. Among Euhirudinea, the true leeches, the smallest is about 1 cm (1⁄2 in) long, and the largest is the giant Amazonian leech, Haementeria ghilianii, which can reach 30 cm (12 in). Except for Antarctica, leeches are found throughout the world but are at their most abundant in temperate lakes and ponds in the northern hemisphere. The majority of freshwater leeches are found in the shallow, vegetated areas on the edges of ponds, lakes and slow-moving streams; very few species tolerate fast-flowing water. In their preferred habitats, they may occur in very high densities; in a favourable environment with water high in organic pollutants, over 10,000 individuals were recorded per square metre (over 930 per square foot) under rocks in Illinois. Some species aestivate during droughts, burying themselves in the sediment, and can lose up to 90% of their bodyweight and still survive. Among the freshwater leeches are the Glossiphoniidae, dorso-ventrally flattened animals mostly parasitic on vertebrates such as turtles, and unique among annelids in both brooding their eggs and carrying their young on the underside of their bodies.The terrestrial Haemadipsidae are mostly native to the tropics and subtropics, while the aquatic Hirudinidae have a wider global range; both of these feed largely on mammals, including humans. A distinctive family is the Piscicolidae, marine or freshwater ectoparasites chiefly of fish, with cylindrical bodies and usually well-marked, bell-shaped, anterior suckers. Not all leeches feed on blood; the Erpobdelliformes, freshwater or amphibious, are carnivorous and equipped with a relatively large, toothless mouth to ingest insect larvae, molluscs, and other annelid worms, which are swallowed whole. In turn, leeches are prey to fish, birds, and invertebrates.The name for the subclass, Hirudinea, comes from the Latin hirudo (genitive hirudinis), a leech; the element -bdella found in many leech group names is from the Greek βδέλλα bdella, also meaning leech. The name Les hirudinées was given by Jean-Baptiste Lamarck in 1818. Leeches were traditionally divided into two infraclasses, the Acanthobdellidea (primitive leeches) and the Euhirudinea (true leeches). The Euhirudinea are divided into the proboscis-bearing Rhynchobdellida and the rest, including some jawed species, the "Arhynchobdellida", without a proboscis.The phylogenetic tree of the leeches and their annelid relatives is based on molecular analysis (2019) of DNA sequences. Both the former classes "Polychaeta" (bristly marine worms) and "Oligochaeta" (including the earthworms) are paraphyletic: in each case the complete groups (clades) would include all the other groups shown below them in the tree. The Branchiobdellida are sister to the leech clade Hirudinida, which approximately corresponds to the traditional subclass Hirudinea. The main subdivision of leeches is into the Rhynchobdellida and the Arhynchobdellida, though the Acanthobdella are sister to the clade that contains these two groups.

Evolution
The most ancient annelid group consists of the free-living polychaetes that evolved in the Cambrian period, being plentiful in the Burgess Shale about 500 million years ago. Oligochaetes evolved from polychaetes and the leeches branched off from the oligochaetes. The oldest leech fossils are from the Jurassic period around 150 million years ago, but a fossil with external ring markings found in Wisconsin in the 1980s, with what appears to be a large sucker, seems to extend the groups evolutionary history back to the Silurian, some 437 million years ago.

Anatomy and physiology
Leeches show a remarkable similarity to each other in morphology, very different from typical annelids which are cylindrical with a fluid-filled space, the coelom (body cavity). In leeches, the coelom is reduced to four slender longitudinal channels, and the interior of the body is filled with a solid dermis in between the various organs. Typically, the body is dorso-ventrally flattened and tapers at both ends. Longitudinal and circular muscles in the body wall are supplemented by diagonal muscles, giving the leech the ability to adopt a large range of body shapes and show great flexibility. Most leeches have a sucker at both the anterior (front) and posterior (back) ends, but some primitive leeches have a single sucker at the back.

Like other annelids, the leech is a segmented animal, but unlike other annelids, the segmentation is masked by external ring markings (annulations). The number of annulations varies, both between different regions of the body and between species. In one species, the body surface is divided into 102 annuli, but the body consists of 33 segments, a number constant across all leech species. Of these segments, the first five are designated as the head and include the anterior brain, several ocelli (eyespots) dorsally and the sucker ventrally. The following 21 mid-body segments each contain a nerve ganglion, and between them contain two reproductive organs, a single female gonopore and nine pairs of testes. The last seven segments contain the posterior brain and are fused to form the animals tail sucker.The body wall consists of a cuticle, an epidermis and a thick layer of fibrous connective tissue in which are embedded the circular muscles, the diagonal muscles and the powerful longitudinal muscles. There are also dorso-ventral muscles. The coelomic channels run the full length of the body, the two main ones being on either side; these have taken over the function of the hemal system (blood vessels) in other annelids. Part of the lining epithelium consists of chloragogen cells which are used for the storage of nutrients and in excretion. There are 10 to 17 pairs of metanephridia (excretory organs) in the mid-region of the leech. From these, ducts typically lead to a urinary bladder, which empties to the outside at a nephridiopore.

Reproduction and development
Leeches are hermaphrodites, with the male reproductive organs, the testes, maturing first and the ovaries later. In hirudinids, a pair will line up with the clitellar regions in contact, with the anterior end of one leech pointing towards the posterior end of the other; this results in the male gonopore of one leech being in contact with the female gonopore of the other. The penis passes a spermatophore into the female gonopore and sperm is transferred to, and probably stored in, the vagina.Some jawless leeches (Rhynchobdellida) and proboscisless leeches (Arhynchobdellida) lack a penis, and in these, sperm is passed from one individual to another by hypodermic injection. The leeches intertwine and grasp each other with their suckers. A spermatophore is pushed by one through the integument of the other, usually into the clitellar region. The sperm is liberated and passes to the ovisacs, either through the coelomic channels or interstitially through specialist "target tissue" pathways.Some time after copulation, the small, relatively yolkless eggs are laid. In most species, an albumin-filled cocoon is secreted by the clitellum and receives one or more eggs as it passes over the female gonopore. In the case of the North American Erpobdella punctata, the clutch size is about five eggs, and some ten cocoons are produced. Each cocoon is fixed to a submerged object, or in the case of terrestrial leeches, deposited under a stone or buried in damp soil. The cocoon of Hemibdella soleae is attached to a suitable fish host. The glossiphoniids brood their eggs, either by attaching the cocoon to the substrate and covering it with their ventral surface, or by securing the cocoon to their ventral surface, and even carrying the newly hatched young to their first meal.When breeding, most marine leeches leave their hosts and become free-living in estuaries. Here they produce their cocoons, after which the adults of most species die. When the eggs hatch, the juveniles seek out potential hosts when these approach the shore. Leeches mostly have an annual or biannual life cycle.

Feeding and digestion
About three quarters of leech species are parasites that feed on the blood of a host, while the remainder are predators. Leeches either have a pharynx that they can protrude, commonly called a proboscis, or a pharynx that they cannot protrude, which in some groups is armed with jaws.In the proboscisless leeches, the jaws (if any) of Arhynchobdellids are at the front of the mouth, and have three blades set at an angle to each other. In feeding, these slice their way through the skin of the host, leaving a Y-shaped incision. Behind the blades is the mouth, located ventrally at the anterior end of the body. It leads successively into the pharynx, a short oesophagus, a crop (in some species), a stomach and a hindgut, which ends at an anus located just above the posterior sucker. The stomach may be a simple tube, but the crop, when present, is an enlarged part of the midgut with a number of pairs of ceca that store ingested blood. The leech secretes an anticoagulant, hirudin, in its saliva which prevents the blood from clotting before ingestion. A mature medicinal leech may feed only twice a year, taking months to digest a blood meal.

The bodies of predatory leeches are similar, though instead of a jaw many have a protrusible proboscis, which for most of the time they keep retracted into the mouth. Such leeches are often ambush predators that lie in wait until they can strike prey with the proboscises in a spear-like fashion. Predatory leeches feed on small invertebrates such as snails, earthworms and insect larvae. The prey is usually sucked in and swallowed whole. Some Rhynchobdellida however suck the soft tissues from their prey, making them intermediate between predators and blood-suckers.

Blood-sucking leeches use their anterior suckers to connect to hosts for feeding. Once attached, they use a combination of mucus and suction to stay in place while they inject hirudin into the hosts blood. In general, blood-feeding leeches are non host-specific, and do little harm to their host, dropping off after consuming a blood meal. Some marine species however remain attached until it is time to reproduce. If present in great numbers on a host, these can be debilitating, and in extreme cases, cause death.Leeches are unusual in that they do not produce certain digestive enzymes such as amylases, lipases or endopeptidases. A deficiency of these enzymes and of B complex vitamins is compensated for by enzymes and vitamins produced by endosymbiotic microflora. In Hirudo medicinalis, these supplementary factors are produced by an obligatory mutualistic relationship with the bacterial species, Aeromonas veronii. Non-bloodsucking leeches, such as Erpobdella octoculata, are host to morew bacterial symbionts. In addition, leeches produce intestinal exopeptidases which remove amino acids from the long protein molecules one by one, possibly aided by proteases from endosymbiotic bacteria in the hindgut. This evolutionary choice of exopeptic digestion in Hirudinea distinguishes these carnivorous clitellates from oligochaetes, and may explain why digestion in leeches is so slow.

Nervous system
A leechs nervous system is formed of a few large nerve cells; their large size makes leeches convenient as model organisms for the study of invertebrate nervous systems. The main nerve centre consists of the cerebral ganglion above the gut and another ganglion beneath it, with connecting nerves forming a ring around the pharynx a little way behind the mouth. A nerve cord runs backwards from this in the ventral coelomic channel, with 21 pairs of ganglia in segments six to 26. In segments 27 to 33, other paired ganglia fuse to form the caudal ganglion. Several sensory nerves connect directly to the cerebral ganglion; there are sensory and motor nerve cells connected to the ventral nerve cord ganglia in each segment.Leeches have between two and ten pigment spot ocelli, arranged in pairs towards the front of the body. There are also sensory papillae arranged in a lateral row in one annulation of each segment. Each papilla contains many sensory cells. Some rhynchobdellids have the ability to change colour dramatically by moving pigment in chromatophore cells; this process is under the control of the nervous system but its function is unclear as the change in hue seems unrelated to the colour of the surroundings.Leeches can detect touch, vibration, movement of nearby objects, and chemicals secreted by their hosts; freshwater leeches crawl or swim towards a potential host standing in their pond within a few seconds. Species that feed on warm-blooded hosts move towards warmer objects. Many leeches avoid light, though some blood feeders move towards light when they are ready to feed, presumably increasing the chances of finding a host.

Gas exchange
Leeches live in damp surroundings and in general respire through their body wall. The exception to this is in the Piscicolidae, where branching or leaf-like lateral outgrowths from the body wall form gills. Some rhynchobdellid leeches have an extracellular haemoglobin pigment, but this only provides for about half of the leechs oxygen transportation needs, the rest occurring by diffusion.

Movement
Leeches move using their longitudinal and circular muscles in a modification of the locomotion by peristalsis, self-propulsion by alternately contracting and lengthening parts of the body, seen in other annelids such as earthworms. They use their posterior and anterior suckers (one on each end of the body) to enable them to progress by looping or inching along, in the manner of geometer moth caterpillars. The posterior end is attached to the substrate, and the anterior end is projected forward peristaltically by the circular muscles until it touches down, as far as it can reach, and the anterior end is attached. Then the posterior end is released, pulled forward by the longitudinal muscles, and reattached; then the anterior end is released, and the cycle repeats. Leeches explore their environment with head movements and body waving. The Hirudinidae and Erpobdellidae can swim rapidly with up-and-down or sideways undulations of the body; the Glossiphoniidae in contrast are poor swimmers and curl up and fall to the sediment below when disturbed.

Interactions with humans
Bites
Leech bites are generally alarming rather than dangerous, though a small percentage of people have severe allergic or anaphylactic reactions and require urgent medical care. Symptoms of these reactions include red blotches or an itchy rash over the body, swelling around the lips or eyes, a feeling of faintness or dizziness, and difficulty in breathing. An externally attached leech will detach and fall off on its own accord when it is satiated on blood, which may take from twenty minutes to a few hours; bleeding from the wound may continue for some time. Internal attachments, such as inside the nose, are more likely to require medical intervention.Bacteria, viruses, and protozoan parasites from previous blood sources can survive within a leech for months, so leeches could potentially act as vectors of pathogens. Nevertheless, only a few cases of leeches transmitting pathogens to humans have been reported.Leech saliva is commonly believed to contain anaesthetic compounds to numb the bite area, but this has never been proven. Although morphine-like substances have been found in leeches, they have been found in the neural tissues, not the salivary tissues. They are used by the leeches in modulating their own immunocytes and not for anaesthetising bite areas on their hosts. Depending on the species and size, leech bites can be barely noticeable or they can be fairly painful.

In human culture
The leech appears in Proverbs 30:15 as an archetype of insatiable greed. More generally, a leech is a persistent social parasite or sycophant.The medicinal leech Hirudo medicinalis, and some other species, have been used for clinical bloodletting for at least 2,500 years: Ayurvedic texts describe their use for bloodletting in ancient India. In ancient Greece, bloodletting was practised according to the theory of humours found in the Hippocratic Corpus of the fifth century BC, which maintained that health depended on a balance of the four humours: blood, phlegm, black bile and yellow bile. Bloodletting using leeches enabled physicians to restore balance if they considered blood was present in excess.Pliny the Elder reported in his Natural History that the horse leech could drive elephants mad by climbing up inside their trunks to drink blood. Pliny also noted the medicinal use of leeches in ancient Rome, stating that they were often used for gout, and that patients became addicted to the treatment. In Old English, lǣce was the name for a physician as well as for the animal, though the words had different origins, and lǣcecraft, leechcraft, was the art of healing.

		
		
William Wordsworths 1802 poem "Resolution and Independence" describes one of the last of the leech-gatherers, people who travelled Britain catching leeches from the wild, and causing a sharp decline in their abundance, though they remain numerous in Romney Marsh. By 1863, British hospitals had switched to imported leeches, some seven million being imported to hospitals in London that year.
In the nineteenth century, demand for leeches was sufficient for hirudiculture, the farming of leeches, to become commercially viable. Leech usage declined with the demise of humoral theory, but made a small-scale comeback in the 1980s after years of decline, with the advent of microsurgery, where venous congestion can arise due to inefficient venous drainage. Leeches can reduce swelling in the tissues and promote healing, helping in particular to restore circulation after microsurgery to reattach body parts