# High level reporting function compatible with AML¶

Interface to use the new MTG implementation with the old AMAPmod interface.

openalea.mtg.aml.Activate(g)[source]

All the functions of the MTG module use an implicit MTG argument which is defined as the active MTG.

This function activates a MTG already loaded into memory which thus becomes the implicit argument of all functions of module MTG.

>>> Activate(g)

Parameters: g: MTG to be activated When several MTGs are loaded into memory, only one is active at a time. By default, the active MTG is the last MTG loaded using function MTG(). However, it is possible to activate an MTG already loaded using function Activate() The current active MTG can be identified using function Active(). MTG()
openalea.mtg.aml.Active()[source]

Returns the active MTG.

If no MTG is loaded into memory, None is returned.

>>> Active()

Returns: When several MTGs are loaded into memory, only one is active at a time. By default, the active MTG is the last MTG loaded using function MTG(). However, it is possible to activate an MTG already loaded using function Activate(). The current active MTG can be identified using function Active().

openalea.mtg.aml.AlgHeight(v1, v2)[source]

Algebraic value defining the number of components between two components.

This function is similar to function Height(v1, v2) : it returns the number of components between two components, at the same scale, but takes into account the order of vertices v1 and v2.

The result is positive if v1 is an ancestor of v2, and negative if v2 is an ancestor of v1.

AlgHeight(v1, v2)

Parameters: v1 (int) : vertex of the active MTG. v2 (int) : vertex of the active MTG. int If v1 is not an ancestor of v2 (or vise versa), or if v1 and v2 are not defined at the same scale, an error value None is returned.
openalea.mtg.aml.AlgOrder(v1, v2)[source]

Algebraic value defining the relative order of one vertex with respect to another one.

This function is similar to function Order(v1, v2) : it returns the number of +-type edges between two components, at the same scale, but takes into account the order of vertices v1 and v2.

The result is positive if v1 is an ancestor of v2, and negative if v2 is an ancestor of v1.

AlgOrder(v1, v2)

Parameters: v1 (int) : vertex of the active MTG. v2 (int) : vertex of the active MTG. int If v1 is not an ancestor of v2 (or vise versa), or if v1 and v2 are not defined at the same scale, an error value None is returned.
openalea.mtg.aml.AlgRank(v1, v2)[source]

Algebraic value defining the relative rank of one vertex with respect to another one.

This function is similar to function Rank(v1, v2) : it returns the number of <-type edges between two components, at the same scale, but takes into account the order of vertices v1 and v2.

The result is positive if v1 is an ancestor of v2, and negative if v2 is an ancestor of v1.

AlgRank(v1, v2)

Parameters: v1 (int) : vertex of the active MTG. v2 (int) : vertex of the active MTG. int If v1 is not an ancestor of v2 (or vise versa), or if v1 and v2 are not defined at the same scale, an error value None is returned.
openalea.mtg.aml.Alpha(e1, e2)[source]
openalea.mtg.aml.Ancestors(v, EdgeType='*', RestrictedTo='NoRestriction', ContainedIn=None)[source]

Array of all vertices which are ancestors of a given vertex

This function returns the array of vertices which are located before the vertex passed as an argument. These vertices are defined at the same scale as v. The array starts by v, then contains the vertices on the path from v back to the root (in this order) and finishes by the tree root.

Note

The anscestor array always contains at least the argument vertex v.

Ancestors(v)

Parameters: Optional Parameters: v (int) : vertex of the active MTG RestrictedTo (str): cf. Father ContainedIn (int): cf. Father EdgeType (str): cf. Father list of vertices’s id (int)
>>> v # prints vertex v
78
>>> Ancestors(v) # set of ancestors of v at the same scale
[78,45,32,10,4]
>>> list(reversed(Ancestors(v))) # To get the vertices in the order from the root to the vertex v
[4,10,32,45,78]


openalea.mtg.aml.Axis(v, Scale=-1)[source]

Array of vertices constituting a botanical axis

An axis is a maximal sequence of vertices connected by ‘<’-type edges. Axis return the array of vertices representing the botanical axis which the argument v belongs to. The optional argument enables the user to choose the scale at which the axis decomposition is required.

Axis(v)
Axis(v, Scale=s)

Parameters: Optional Parameters: v (int) : Vertex of the active MTG Scale (str): scale at which the axis components are required. list of vertices ids

openalea.mtg.aml.Beta(e1, e2)[source]
openalea.mtg.aml.BottomCoord(e1, e2)[source]
openalea.mtg.aml.BottomDiameter(e1, e2)[source]
openalea.mtg.aml.Class(vid)[source]

Class of a vertex

The Class() of a vertex is a feature always defined and independent of time (like the index). It is represented by an alphabetic character in upper or lower case (lower cases characters are considered different from upper cases). The label of a vertex is the string defined by the concatenation of its class and its index. The label thus provides general information about a vertex and enables us to encode the plant components.

Usage: >>> Class(v)  vid (int) : vertex of the active MTG The class of the vertex.

openalea.mtg.aml.ClassScale(c)[source]

Scale at which appears a given class of vertex

Every vertex is associated with a unique class. Vertices from a given class only appear at a given scale which can be retrieved using this function.

ClassScale(c)

Parameters: c (str) : symbol of the considered class int
openalea.mtg.aml.Complex(v, Scale=-1)[source]

Complex of a vertex.

Returns the complex of v. The complex of a vertex v has a scale lower than v : Scale(v) - 1. In a MTG, every vertex except for the MTG root (cf. MTGRoot), has a uniq complex. None is returned if the argument is the MTG Root or if the vertex is undefined.

Complex(v)
Complex(v, Scale=2)

Parameters: Optional Parameters: v (int) : vertex of the active MTG Scale (int) : scale of the complex Returns vertex’s id (int) When a scale different form Scale(v)-1 is specified using the optional parameter Scale, this scale must be lower than that of the vertex argument.

Todo

Complex(v, Scale=10) returns v why ? is this expected

openalea.mtg.aml.ComponentRoots(v, Scale=-1)[source]

Set of roots of the tree graphs that compose a vertex

In a MTG, a vertex may have be decomposed into components. Some of these components are connected to each other, while other are not. In the most general case, the components of a vertex are organized into several tree-graphs. This is for example the case of a MTG containing the description of several plants: the MTG root vertex can be decomposed into tree graphs (not connected) that represent the different plants. This function returns the set of roots of these tree graphs at scale Scale(v)+1. The order of these roots is not significant.

When a scale different from Scale(v)+1 is specified using the optional argument Scale(), this scale must be greater than that of the vertex argument.

ComponentRoots(v)
ComponentRoots(v, Scale=s)

Parameters: Optional Parameters: v (int) : vertex of the active MTG Scale (str): scale of the component roots. list of vertices’s id (int)
>>> v=MTGRoot() # global MTG root
0
>>> ComponentRoots(v) # set of first vertices at scale 1
[1,34,76,100,199,255]
>>> ComponentRoots(v, Scale=2) # set of first vertices at scale 2
[2,35,77,101,200,256]

openalea.mtg.aml.Components(v, Scale=-1)[source]

Set of components of a vertex.

The set of components of a vertex is returned as a list of vertices. If s defines the scale of v, components are defined at scale s + 1. The array is empty if the vertex has no components. The order of the components in the array is not significant.

When a scale is specified using optional argument :arg:Scale, it must be necessarily greater than the scale of the argument.

Components(v)
Components(v, Scale=2)

Parameters: Optional Parameters: v (int) : vertex of the active MTG Scale (int) : scale of the components. list of int

openalea.mtg.aml.Coord(e1, e2)[source]
openalea.mtg.aml.DateSample(e1)[source]

Array of observation dates of a vertex.

Returns the set of dates at which a given vertex (passed as an argument) has been observed as an array of ordered dates. Options can be specified to define a temporal window and the total list of observation dates will be truncated according to the corresponding temporal window.

DateSample(v)
DateSample(v, MinDate=d1, MaxDate=d2)

Parameters: Optional Parameters: v (VTX) : vertex of the active MTG. MinDate (date) : defines a minimum date of interest. MaxDate (date) : defines a maximum date of interest. list of date
openalea.mtg.aml.Defined(vid)[source]

Test whether a given vertex belongs to the active MTG.

Defined(v)

Parameters: v (int) : vertex of the active MTG True or False

openalea.mtg.aml.Descendants(v, EdgeType='*', RestrictedTo='NoRestriction', ContainedIn=None)[source]

Set of vertices in the branching system borne by a vertex.

This function returns the set of descendants of its argument as an array of vertices. The array thus consists of all the vertices, at the same scale as v, that belong to the branching system starting at v. The order of the vertices in the array is not significant.

Note

The argument always belongs to the set of its descendants.

Descendants(v)

Parameters: Optional Parameters: v (int) : vertex of the active MTG RestrictedTo (str): cf. Father ContainedIn (int): cf. Father EdgeType (str): cf. Father list of int.
>>> v
78
>>> Sons(v) # set of sons of v
[78,99,101]
>>> Descendants(v) # set of descendants of v
[78,99,101,121,133,135,156,171,190]


openalea.mtg.aml.DressingData(e1)[source]

Use openalea.mtg.dresser.DressingData instead of this function

openalea.mtg.aml.EdgeType(v1, v2)[source]

Type of connection between two vertices.

Returns the symbol of the type of connection between two vertices (either < or +). If the vertices are not connected, None is returned.

EdgeType(v1, v2)

Parameters: v1 (int) : vertex of the active MTG v2 (int) : vertex of the active MTG ‘<’ (successor), ‘+’ (branching) or None

openalea.mtg.aml.Extremities(v, RestrictedTo='NoRestriction', ContainedIn=None)[source]

Set of vertices that are the extremities of the branching system born by a given vertex.

This function returns the extremities of the branching system defined by the argument as a list of vertices. These vertices have the same scale as v and their order in the list is not signifiant. The result is always a non empty array.

Extremities(v)

Properties: Optional Parameters: v (int) : vertex of the active MTG RestrictedTo (str): cf. Father() ContainedIn (int): cf. Father() list of vertices’s id (int)
>>> Descendants(v)
[3, 45, 47, 78, 102]
>>> Extremities(v)
[47, 102]

openalea.mtg.aml.Father(v, EdgeType='*', RestrictedTo='NoRestriction', ContainedIn=None, Scale=-1)[source]

Topological father of a given vertex.

Returns the topological father of a given vertex. And None if the father does not exist. If the argument is not a valid vertex, None is returned.

Father(v)
Father(v, EdgeType='<')
Father(v, RestrictedTo='SameComplex')
Father(v, ContainedIn=complex_id)
Father(v, Scale=s)

Parameters: Optional Parameters: v (int) : vertex of the active MTG If no optional argument is specified, the function returns the topological father of the argument (vertex that bears or precedes to the vertex passed as an argument). It may be usefull in some cases to consider that the function only applies to a subpart of the MTG (e.g. an axis). The following options enables us to specify such restrictions: EdgeType (str) : filter on the type of edge that connect the vertex to its father. Values can be ‘<’, ‘+’, and ‘*’. Values ‘*’ means both ‘<’ and ‘+’. Only the vertex connected with the specified type of edge will be considered. RestrictedTo (str) : filter defining a subpart of the MTG where the father must be considered. If the father is actually outside this subpart, the result is None. Possible subparts are defined using keywords in [‘SameComplex’, ‘SameAxis’, ‘NoRestriction’]. For instance, if RestrictedTo is set to ‘SameComplex’, Father(v)() returns a defined vertex only if the father f of v existsin the MTG and if v and f have the same complex. ContainedIn (int) : filter defining a subpart of the MTG where the father must be considered. If the father is actually outside this subpart, the result is None. In this case, the subpart of the MTG is made of the vertices that composed composite_id (at any scale). Scale (int) : the scale of the considered father. Returns the vertex from scale s which either bears and precedes the argument. The scale s can be lower than the argument’s (corresponding to a question such as ‘which axis bears the internode?’) or greater (e.g. ‘which internodes bears this annual shoot?’). the vertex id of the Father (int)
openalea.mtg.aml.Feature(vid, fname, date=None)[source]

Extracts the attributes of a vertex.

Returns the value of the attribute fname of a vertex in a MTG.

If the value of an attribute is not defined in the coding file, the value None is returned.

Feature(vid, fname)
Feature(vid, fname, date)

Parameters: vid (int) : vertex of the active MTG. fname (str) : name of the attribute (as specified in the coding file). date (date) : (for a dynamic MTG) date at which the attribute of the vertex is considered. int, str, date or float If for a given attribute, several values are available(corresponding to different dates), the date of interest must be specified as a third attribute. This date must be a valid date appearing in the coding file for a considered vertex. Otherwise None is returned. MTGs and Dynamic MTGs.

Todo

specify the format of date

openalea.mtg.aml.FirstDefinedFeature(e1, e2)[source]

Date of first observation of a vertex.

Returns the date d for which the attribute fname is defined for the first time on the vertex v passed as an argument. This date must be greater than the option MinDate and/or less than the maximum MaxData when specified. Otherwise the returned date is None.

FirstDefinedFeature(v, fname)
FirstDefinedFeature(v, fname, MinDate=d1, MaxDate=d2)

Properties: Optional Properties: v (int) : vertex of the active MTG fname (str) : name of the considered property MinDate (date) : minimum date of interest. MaxData (date) : maximum date of interest. date
openalea.mtg.aml.Height(v1, v2=None)[source]

Number of components existing between two components in a tree graph.

The height of a vertex (v2) with respect to another vertex (v1) is the number of edges (of either type ‘+’ or ‘<’) that must be crossed when going from v1 to v2 in the graph.

This is a non-negative integer. When the function has only one argument v1, the height of v1 correspond to the height of v1with respect to the root of the branching system containing v1.

Height(v1)
Height(v1, v2)

Parameters: v1 (int) : vertex of the active MTG v2 (int) : vertex of the active MTG int

Note

When the function takes two arguments, the order of the arguments is not important provided that one is an ancestor of the other. When the order is relevant, use function AlgHeight.

openalea.mtg.aml.Index(vid)[source]

Index of a vertex

The Index() of a vertex is a feature always defined and independent of time (like the index). It is represented by a non negative integer. The label of a vertex is the string defined by the concatenation of its class and its index. The label thus provides general information about a vertex and enables us to encode the plant components.

Usage: >>> Index(v)  vid (int) : vertex of the active MTG int
openalea.mtg.aml.Label(v)[source]

Label of a vertex

Usage: >>> Label(v) #doctest: +SKIP  vid (int) : vertex of the active MTG The class and Index of the vertex (str).
openalea.mtg.aml.LastDefinedFeature(e1, e2)[source]

Date of last observation of a given attribute of a vertex.

Returns the date d for which the attribute fname is defined for the last time on the vertex v passed as an argument. This date must be greater than the option MinDate and/or less than the maximum MaxData when specified. Otherwise the returned date is None.

FirstDefinedFeature(v, fname)
FirstDefinedFeature(v, fname, MinDate=d1, MaxDate=d2)

Properties: Optional Properties: v (int) : vertex of the active MTG fname (str) : name of the considered property MinDate (date) : minimum date of interest. MaxData (date) : maximum date of interest. date
openalea.mtg.aml.Length(e1, e2)[source]
openalea.mtg.aml.Location(v, Scale=-1, ContainedIn=None)[source]

Vertex defining the father of a vertex with maximum scale.

If no options are supplied, this function returns the vertex defining the father of a vertex with maximum scale (cf. Father()). If it does not exist, None is returned. If a scale is specified, the function is equivalent to Father(v, Scale=s).

Location(v)
Location(v, Scale=s)
Location(v, ContainedIn=complex_id)

Parameters: Optional Parameters: v (int) : vertex of the active MTG. Scale (int) : scale at which the location is required. ContainedIn (int) : cf. Father() Returns vertex’s id (int)
>>> Father(v, EdgeType='+')
7
>>> Complex(v)
4
>>> Components(7)
[9,19,23, 34, 77, 89]
>>> Location(v)
23
>>> Location(v, Scale= Scale(v)+1)
23
>>> Location(v, Scale= Scale(v))
7
>>> Location(v, Scale= Scale(v)-1)
4


openalea.mtg.aml.MTG(filename)[source]

MTG constructor.

Builds a MTG from a coding file (text file) containing the description of one or several plants.

MTG(filename)

Parameters: filename (str): name of the coding file describing the mtg If the parsing process succeeds, returns an object of type MTG(). Otherwise, an error is generated, and the formerly active MTG remains active. If the MTG() is built, the new MTG() becomes the active MTG() (i.e. the MTG() implicitly used by other functions such as Father(), Sons(), VtxList(), …). The parsing process is approximatively proportional to the number of components defined in the coding file. MTG is an acronyme for Multiscale Tree Graph.
openalea.mtg.aml.MTGRoot()[source]

Returns the root vertex of the MTG.

It is the only vertex at scale 0 (the coarsest scale).

>>> MTGRoot()

Returns: vtx identifier This vertex is the complex of all vertices from scale 1. It is a mean to refer to the entire database.
openalea.mtg.aml.NextDate(e1)[source]

Next date at which a vertex has been observed after a specified date

Returns the first observation date at which the vertex has been observed starting at date d and proceeding forward in time. None is returned if it does not exists.

NextDate(v, d)

Parameters: v (int) : vertex of the active MTG. d (date) : departure date. date
openalea.mtg.aml.Order(v1, v2=None)[source]

Order of a vertex in a graph.

The order of a vertex (v2) with respect to another vertex (v1) is the number of edges of either type ‘+’ that must be crossed when going from v1 to v2 in the graph. This is thus a non negative integer which corresponds to the “botanical order”.

When the function only has one argument v1, the order of v1 correspond to the order of v1 with respect to the root of the branching system containing v1.

Order(v1)
Order(v1, v2)

Parameters: v1 (int) : vertex of the active MTG v2 (int) : vertex of the active MTG int

Note

When the function takes two arguments, the order of the arguments is not important provided that one is an ancestor of the other. When the order is relevant, use function AlgOrder().

Warning

The value returned by function Order is 0 for trunks, 1 for branches etc. This might be different with some botanical conventions where 1 is the order of the trunk, 2 the order of branches, etc.

openalea.mtg.aml.PDir(e1, e2)[source]
openalea.mtg.aml.Path(v1, v2)[source]

List of vertices defining the path between two vertices

This function returns the list of vertices defining the path between two vertices that are in an ancestor relationship. The vertex v1 must be an ancestor of vertex v2. Otherwise, if both vertices are valid, then the empty array is returned and if at least one vertex is undefined, None is returned.

Path(v1, v2)

Parameters: v1 (int) : vertex of the active MTG v2 (int) : vertex of the active MTG list of vertices’s id (int)
>>> v # print the value of v
78
>>> Ancestors(v)
[78,45,32,10,4]
>>> Path(10,v)
[10,32,45,78]
>>> Path(9,v) # 9 is not an ancestor of 78
[]


Note

v1 can be equal to v2.

openalea.mtg.aml.PlantFrame(e1)[source]

Use openalea.mtg.plantframe.PlantFrame insteead of this function

openalea.mtg.aml.Plot(e1)[source]
openalea.mtg.aml.Predecessor(v, **kwds)[source]

Father of a vertex connected to it by a ‘<’ edge

This function is equivalent to Father(v, EdgeType-> ‘<’). It thus returns the father (at the same scale) of the argument if it is located in the same botanical. If it does not exist, None is returned.

Predecessor(v)

Parameters: Optional Parameters: v (int) : vertex of the active MTG RestrictedTo (str): cf. Father ContainedIn (int): cf. Father return the vertex id (int)
>>> Predecessor(v)
7
>>> Father(v, EdgeType='+')
>>> Father(v, EdgeType-> '<')
7

openalea.mtg.aml.PreviousDate(e1)[source]

Previous date at which a vertex has been observed after a specified date.

Returns the first observation date at which the vertex has been observed starting at date d and proceeding backward in time. None is returned if it does not exists.

PreviousDate(v, d)

Parameters: v (int) : vertex of the active MTG. d (date) : departure date. date
openalea.mtg.aml.Rank(v1, v2=None)[source]

Rank of one vertex with respect to another one.

This function returns the number of consecutive ‘<’-type edges between two components, at the same scale, and does not take into account the order of vertices v1 and v2. The result is a non negative integer.

Rank(v1)
Rank(v1, v2)

Parameters: v1 (int) : vertex of the active MTG v2 (int) : vertex of the active MTG int If v1 is not an ancestor of v2 (or vise versa) within the same botanical axis, or if v1 and v2 are not defined at the same scale, an error value Undef id returned.
openalea.mtg.aml.RelBottomCoord(e1, e2)[source]
openalea.mtg.aml.RelTopCoord(e1, e2)[source]
openalea.mtg.aml.Root(v, RestrictedTo='*', ContainedIn=None)[source]

Root of the branching system containing a vertex

This function is equivalent to Ancestors(v, EdgeType=’<’)[-1]. It thus returns the root of the branching system containing the argument. This function never returns None.

Root(v)

Parameters: Optional Parameters: v (int) : vertex of the active MTG RestrictedTo (str): cf. Father ContainedIn (int): cf. Father return vertex’s id (int)
>>> Ancestors(v) # set of ancestors of v
[102,78,35,33,24,12]
>>> Root(v) # root of the branching system containing v
12


openalea.mtg.aml.SDir(e1, e2)[source]
openalea.mtg.aml.Scale(vid)[source]

Scale of a vertex

Returns the scale at which is defined the argument.

Usage: >>> Scale(vid)  vid (int) : vertex of the active MTG vid (PlantFrame) : a PlantFrame object computed on the active MTG vid (LineTree) : a LineTree computed on a PlantFrame representing the active MTG int
openalea.mtg.aml.Sons(v, RestrictedTo='NoRestriction', EdgeType='*', Scale=-1, ContainedIn=None)[source]

Set of vertices born or preceded by a vertex

The set of sons of a given vertex is returned as an array of vertices. The order of the vertices in the array is not significant. The array can be empty if there are no son vertices.

from openalea.mtg.aml import Sons
Sons(v)
Sons(v, EdgeType= '+')
Sons(v, Scale= 3)

Parameters: Optional Parameters: v (int) : vertex of the active MTG RestrictedTo (str) : cf. Father ContainedIn (int) : cf. Father EdgeType (str) : filter on the type of sons. Scale (int) : set the scale at which sons are considered. list(vid) When the option EdgeType is applied, the function returns the set of sons that are connected to the argument with the specified type of relation.

Note

Sons(v, EdgeType= ‘<’) is not equivalent to Successor(v). The first function returns an array of vertices while the second function returns a vertex.

The returned vertices have the same scale as the argument. However, coarser or finer vertices can be obtained by specifying the optional argument Scale at which the sons are considered.

>>> Sons(v)
[3,45,47,78,102]
>>>  Sons(v, EdgeType= '+') # set of vertices borne by v
[3,45,47,102]
>>>  Sons(v, EdgeType= '<') # set of successors of v on the same axis
[78]

openalea.mtg.aml.Successor(v, RestrictedTo='NoRestriction', ContainedIn=None)[source]

Vertex that is connected to a given vertex by a ‘<’ edge type (i.e. in the same botanical axis).

This function is equivalent to Sons(v, EdgeType=’<’)[0]. It returns the vertex that is connected to a given vertex by a ‘<’ edge type (i.e. in the same botanical axis). If many such vertices exist, an arbitrary one is returned by the function. If no such vertex exists, None is returned.

Successor(v)

Parameters: Optional Parameters: v1 (int) : vertex of the active MTG RestrictedTo (str): cf. Father ContainedIn (int): cf. Father Returns vertex’s id (int)
>>> Sons(v)
[3, 45, 47, 78, 102]
>>> Sons(v, EdgeType='+') # set of vertices borne by v
[3, 45, 47, 102]
>>> Sons(v, EdgeType-> '<') # set of successors of v
[78]
>>> Successor(v)
78

openalea.mtg.aml.TopCoord(e1, e2)[source]
openalea.mtg.aml.TopDiameter(e1, e2)[source]
openalea.mtg.aml.Trunk(v, Scale=-1)[source]

List of vertices constituting the bearing botanical axis of a branching system.

Trunk returns the list of vertices representing the botanical axis defined as the bearing axis of the whole branching system defined by v. The optional argument enables the user to choose the scale at which the trunk should be detailed.

Trunk(v)
Trunk(v, Scale= s)

Parameters: Optional Parameters: v (int) : Vertex of the active MTG. Scale (str): scale at which the axis components are required. list of vertices ids

Todo

check the usage of the optional argument Scale

openalea.mtg.aml.VirtualPattern(e1)[source]
openalea.mtg.aml.VtxList(Scale=-1)[source]

Array of vertices contained in a MTG

The set of all vertices in the MTG() is returned as an array. Vertices from all scales are returned if no option is used. The order of the elements in this array is not significant.

>>> VtxList()
>>> VtxList(Scale=2)

Optional Parameters:

• Scale (int): used to select components at a particular scale.
Returns:
• list of vid
Background:

MTGs()

Download the source file ../../src/mtg/aml.py.